[Samba] smbtools, existing users, etc...

Jérôme Tournier jerome.tournier at idealx.com
Tue Nov 18 12:43:58 GMT 2003


> Hello.
Hi !

> Is it possible to add samba part of user account to the already existing user account
> in LDAP?

My response is only available if you use the smbldap-tools.
Yes you can. If you applied the patch i post this morning to the latest scripts (look at
cvs.idealx.org), you can use the following command to add the sambaSAMAccount
objectclass to the user 'user'.
$ smbldap-usermod.pl -a user
The sambaSID attribute will be calculated as 2*uidNumber+1000.
You can also add more informations:
  -a    add sambaSAMAccount objectclass
  -e    expire date ("YYYY-MM-DD HH:MM:SS")
  -A    can change password ? 0 if no, 1 if yes
  -B    must change password ? 0 if no, 1 if yes
  -C    sambaHomePath (SMB home share, like '\\PDC-SRV\homes')
  -D    sambaHomeDrive (letter associated with home share, like 'H:')
  -E    sambaLogonScript (DOS script to execute on login)
  -F    sambaProfilePath (profile directory, like '\\PDC-SRV\profiles\foo')
  -H    sambaAcctFlags (samba account control bits like '[NDHTUMWSLKI]')
  -I    disable an user. Can't be used with -H or -J
  -J    enable an user. Can't be used with -H or -I
For example:
$ smbldap-usermod.pl -a -E script.cmd user


> What if my user changes his password ( by using a web php-backend ), is samba password
> automatically changed, or do I have to change it manually?
No it is not. Can can calculate the lmPassword and ntPassword, and patch your
php-backend to update le attributes. Or can can use smbldap-passwd.pl that update both
unix password and win32 passwords.
-- 
Jérôme





More information about the samba mailing list