Samba Administration
Process Control
Restarting Samba
/usr/local/etc/rc.d/samba restart
Disconnecting a Specific User
!) Find out that user's PID.
smbstatus | grep <username>
You're looking for something that looks like the following. THe number all the way on the left is the PID.
60096 mike mike MachineName (192.168.255.XX)
2) Kill the PID
kill <PID>
Users
New domain users
1) Samba needs a user (should be locked with no shell, and in appropriate groups)
adduser --disabled-password --disabled-login --no-create-home --shell /bin/false username
2) Add user to samba password file
smbpasswd -a <username>
Viewing Account Details
To view samba account details.
pdbedit -v -u <username>
To see what groups the user is a member of.
id <username>
Too see who is logged on to Samba.
smbstatus -b
Deleting users
rmuser -y <username> smbpasswd -x <username>
Adding Unix Groups
Grab your favorite text editor and edit /etc/group OR
pw groupadd <group>
Adding Users to Groups
Grab your favorite text editor and add them to the proper line in /etc/group.
Login Script
/usr/home/netlogin/logon.bat maps network drives and syncs workstation time to starcrunch's time.
Note At this time(5/31/2007), the login script does not run on every machine or for every user. It is still being investigated.
Machines
New Win 2K/NT workstations
To join domain, machine accounts need to be created on PDC with empty passwords. Machine accounts end in '$'.
smbpasswd -a <machine>$ smbpasswd -a -m <machine>$
File Permissions
Changing the Owner
chown <user>:<group> <file>
Setting Access Permissions
Where each * stands for a number 1 through 7.
chmod *** <file>
7 = rwx
6 = rw-
5 = r-x
4 = r--
CategoryITMisc