[Samba] smbldap-tools, setting password on command line?

Craig White craigwhite at azapple.com
Mon Jul 12 01:19:07 GMT 2004


On Sun, 2004-07-11 at 13:33, malte.mueller at ewetel.net wrote:
> Hi,
> 
> the smbldap tools are a great thing to have, thanks a lot!
> I just wonder if it would be possible to set a password via the command line, like:
> smbldap-passwd.pl testuser1 not24get
> I have to create accounts for several hundreds people every year and give them
> an immutable password. So long I do that with smbpasswd, ldappasswd and a tiny
> script around these tools. I tried 
> smbldap-passwd.pl testuser1 < pass 
> where pass contains on two lines the passwort, but thats a solution I'm not
> proud of, especially since I get this warning/error:
> fileserver:~ # /opt/samba3/sbin/smbldap-passwd.pl testuser2 < testpasses
> Changing password for testuser2
> stty: standard input: Inappropriate ioctl for device
> New password :
> stty: standard input: Inappropriate ioctl for device
> stty: standard input: Inappropriate ioctl for device
> Retype new password :
> stty: standard input: Inappropriate ioctl for device
> 
> Is there any straight-forward solution?
> 
----
yeah, a working configuration. Suggest that you turn up your logging
levels.

smbpasswd user

will prompt for a password for user and if properly configured, pass the
changed password to the mechanism in place (in your case, smbldap-tools)
but only if properly configured.

Best guess... you have a 'ldap admin dn' set which needs to have
modification privileges to your ldap server for most everything. Either
you haven't set the password for this account in secrets.tdb (smbpasswd
-w PASSWORD_FOR_LDAP_ADMIN_DN) or your ldap acl's don't permit desired
changes.

Craig



More information about the samba mailing list