[Samba] Re: Adding linux users to linux server with samba

Igor Belyi sambauser at katehok.ac93.org
Fri Oct 15 16:44:32 GMT 2004

David.Grudek at anixter.com wrote:
> Is there a way to add the linux user to the system on the fly while you 
> run smbpasswd -a and even set the password so you do not have to do two 
> steps or to have adduser or useradd add a user to smb by default with the 
> same password if created.  Many of the users in a small business do not 
> remember to add both and then get frustrated when they can't use the 
> system to find it is because they did not add users to both places.

I think you need to add the following parameter in your smb.conf:

add user script = /usr/sbin/useradd -d /dev/null -s /bin/false %u

If you need to add ability to login into Linux system as well then 
change values of -d (user's home) and -s (user's shell) and add 'unix 
password sync = yes' to have UNIX password to be the same as the Samba's 

Hope it helps,

More information about the samba mailing list