[Samba] user creation with samba-tool issue
dahopkins at comcast.net
dahopkins at comcast.net
Wed Oct 23 20:48:08 MDT 2013
I am creating a user with samba-tool. I am essentially using the s4user script (very slight mods to echo some data and assign some site-specific data).
The syntax in the script for a test user is
samba-tool add user test.user47 Passw0rd!
The echo'ed output is (including echo of entities that are to be set via ldbmodify)
Creating s4 posix user test.user48
User 'test.user48' created successfully
dn: CN=test.user48,CN=Users,DC=ncs,DC=k12,DC=de,DC=us
changetype: modify
add: objectclass
objectclass: posixaccount
-
add: uidnumber
uidnumber: 3000159
-
add: gidnumber
gidnumber: 513
-
add:unixhomedirectory
unixhomedirectory: /home/generic/test.user48
-
add: loginshell
loginshell: /bin/bash
Modified 1 records successfully
dn: CN=test.user48,CN=Users,DC=ncs,DC=k12,DC=de,DC=us
changetype: modify
replace: primarygroupid
primarygroupid: 513
sleeping for 5. . .
Modified 1 records successfully
dn: CN=test.user48,CN=Users,DC=ncs,DC=k12,DC=de,dc=us
changetype: modify
add: profilePath
profilePath: \\ncssamba1\profiles\test.user48
-
add: homeDrive
homeDrive: P:
-
add: homeDirectory
homeDirectory: \\ncssamba1\home\generic\test.user48
sleeping. . .
Modified 1 records successfully
New user:test.user48 POSIX-ified as follows:
uid 3000159
gid 513
primaryGroupID 513
getent passwd test.user48
sid S-1-5-21-276688905-1455118844-2751846679-513
profilePath: \\ncssamba1\profiles\test.user48
homeDirectory: \\ncssamba1\home\generic\test.user48
homeDrive: P:
unixHomeDirectory: /home/generic/test.user48
This creates the user and I can see the user using ADUC.
However, if I try to log in I cannot because the password is incorrect. If I reset the password using ADUC, I can then login without issues. The account information from wbinfo is
# wbinfo -i test.user48
NEWARKCHARTER\test.user48:*:3000159:513::/home/NEWARKCHARTER/test.user48:/bin/false
Is there a way to after-the-fact reset the password for an account using samba-tool run as administrator? I also noticed that there is smbpasswd in /usr/local/samba/bin can this be used?
Sincerely,
Dave Hopkins
More information about the samba
mailing list