[Samba] Problem with "add user script"

Jacob Martinson jmartinson at indigopool.com
Mon Oct 20 19:32:33 GMT 2003

Problem - smbpasswd does not seem to be recognizing my "add user script"
option to automatically create Unix users when adding a samba user.

I am running Samba version 2.2.8a (from source) on a Linux (Redhat 8.0)

Relevant lines from smb.conf:

   server string=Samba Server
   netbios name = smbpdc
   security = user  
   domain logons=yes
   domain master = yes
   encrypt passwords=yes
   guest account = smbnobody
   hosts allow = 127. xxx.xxx.xxx.
   add user script=/usr/sbin/useradd -d /dev/null -g 100 -s /bin/false
-M %u
   domain admin group = root @domadmin

The add user script line in smb.conf is contained within a single line.

I have attached the strace output of smbpasswd when trying to add a new
user.  This is the output at the shell:

root at kobe:/usr/local/samba
0 $ smbpasswd -a testuser
New SMB password:
Retype new SMB password:
User testuser does not exist in system password file (usually
/etc/passwd). Cannot add account without a valid local system user.
Failed to modify password entry for user testuser

Running "testparm" does not indicate any problems that I can see and the
add user script section is repeated there just as it is in the smb.conf
as noted above.

root at kobe:/usr/local/samba
0 $  testparm
Load smb config files from /usr/local/samba/lib/smb.conf
Processing section "[netlogon]"
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Press enter to see a dump of your service definitions

Does anyone see a problem with my setup?  Any input is greatly



More information about the samba mailing list