Creating Samba User
October 22nd, 2006 liewsheng Posted in Admin, smbpasswd, useradd | Hits: 6616 |
After you have install samba sever, yous still can’t login samba server. You will need create a samba user :
smbpasswd -a username
‘-a’ switch tell smbpasswd we want to add a new user, is the user you want to add. Please take note, username must exist in /etc/passwd file else you will need the use ‘useradd’ to create a user in Linux :
useradd -d /home/username -s /bin/false -n username
This will create a new user with same group name with (told by ‘-n’), but the user can’t login and run any shell command (because you have specfic the login shell is /bin/false by the ‘-s’ switch, if you want allow user to able to login to a shell, replace /bin/false with /bin/sh).
Ok now you have create a new samba user, how about you want delete or disable them? ‘-d’ switch will disable the user to login to samba server:
smbpasswd -d username
If you want to delete a user permanently:
smbpasswd -x username
Hope you guys, happy communicate with Windows ya ;-p
Live Chat!









March 16th, 2007 at 10:03 am
[...] How? My friend’s (toydi) side need to create a reverse tunnel, 1. He create an user account for me as mysurface, uses useradd 2. Set a default password for mysurface user account, uses passwd 3. Setup ssh reverse tunnel [...]
December 18th, 2007 at 9:42 am
[...] Samba Create Samba user: http://linux.byexamples.com/archives/123/creating-samba-user/ Open terminal and type… smbpasswd -a [...]