Samba. Advanced System Administration Course James Lwali University computing Centre Ltd, University of Dar es salaam, E-mail: [email protected] Website: www.ucc.co.tz. Samba.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
[[email protected] tmp]# chkconfig smb on
(Not created by default.)
(Not created by default.)
You can edit this file by hand, or more simply through Samba's SWAT web interface.
NOTE: Make sure you copy the original configuration file before editing it!
path = /home/samba/netlogon
guest ok = Yes
path = /home/samba/profiles
read only = No
create mask = 0600
directory mask = 0700
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[[email protected] tmp]# /usr/bin/smbpasswd -a root password
Note:Samba domain logins use the smbpasswd password. Samba passwords are stored in the /etc/samba/smbpasswd file.
[[email protected] tmp]# useradd -g 100 peter
[[email protected] tmp]# passwd peter
Changing password for user peter.
Retype new password:
passwd: all authentication tokens updated successfully.
[[email protected] tmp]#
1. Create a new Linux group managers:
[[email protected] tmp]# /usr/sbin/groupadd managers
2. Create a new directory for the group's files. If one user is designated as the leader, you might want to change the chown statement to make them owner
[[email protected] tmp]# mkdir /home/managers-files
[[email protected] tmp]# chgrp parents /home/managers-files
[[email protected] tmp]# chmod 0770 /home/managers-files
[[email protected] tmp]# /usr/bin/smbpasswd -a username password
The -a switch adds the user to the /etc/smbpasswd file. Use a generic password then have users change it immediately from their workstations in the usual way.
1. Delete the users using the smbpasswd with the -x switch
[[email protected] tmp]# smbpasswd -x john
Deleted user john.
[[email protected] root]#
2. Delete The Linux User by following the normal deletion process. For example, to delete the user john and all john's files from the Linux server use:
[[email protected] tmp]# userdel -r john
Sometimes you may not want to delete the user's files so that they can be accessed by other users at some other time. In this case you can just deactivate the user's account using the passwd -l username command.