Samba 3.0.21, SAMBA_3_RELEASE SVN Rel: 12289 Using tdbsam backend, execution of the following fails: net rpc user add snotty -S violetsblue -Uroot%not24get Log level 10 snippet: --------------------- [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_alloc(313) Finding user snotty [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(262) Trying _Get_Pwnam(), username as lowercase is snotty [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(278) Trying _Get_Pwnam(), username as uppercase is SNOTTY [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(286) Checking combinations of 0 uppercase letters in snotty [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(290) Get_Pwnam_internals didn't find user [snotty]! [2005/12/20 00:10:48, 5] rpc_server/srv_samr_nt.c:_samr_create_user(2346) _samr_create_user: can add this account : False useradd: Invalid account name `’snotty’'. [2005/12/20 00:10:48, 0] rpc_server/srv_samr_nt.c:_samr_create_user(2359) _samr_create_user: Running the command `/usr/sbin/useradd -m ’snotty’' gave 6 [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_alloc(313) Finding user snotty [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(262) Trying _Get_Pwnam(), username as lowercase is snotty [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(278) Trying _Get_Pwnam(), username as uppercase is SNOTTY [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(286) Checking combinations of 0 uppercase letters in snotty [2005/12/20 00:10:48, 5] lib/username.c:Get_Pwnam_internals(290) Get_Pwnam_internals didn't find user [snotty]! Execution of: /usr/sbin/useradd -m ’snotty’ works from the command line without problem. The smb.conf file used: ----------------------- [global] workgroup = ROSESARERED netbios name = VIOLETSBLUE passdb backend = tdbsam username map = /etc/samba/smbusers enable privileges = Yes log level = 10 log file = /var/log/samba/%m.log max log size = 0 add user script = /usr/sbin/useradd -m ’%u’ delete user script = /usr/sbin/userdel -r ’%u’ add group script = /usr/sbin/groupadd ’%g’ delete group script = /usr/sbin/groupdel ’%g’ add user to group script = /usr/sbin/usermod -G ’%g’ ’%u’ set primary group script = /usr/sbin/usermod -g '%g' '%u' add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null ’%u’ logon script = scripts\logon.bat logon path = \\%L\profiles\%U logon drive = h: logon home = \\%L\%U domain logons = Yes
I can't reproduce this. What is this log ? _samr_create_user: can add this account : False useradd: Invalid account name `’snotty’'. _samr_create_user: Running the command `/usr/sbin/useradd -m ’snotty’' gave 6 Seems that you don't have the SeAddUserPrivilege. I'm assuming the `’snotty’' string is just a translation issue when posting the bug report.
Your anaysis was correct on both counts. - John T.