malte.mueller@ewetel.net
2004-Jul-11 20:34 UTC
[Samba] smbldap-tools, setting password on command line?
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? With kind regards, Malte Mueller -- Powered by EWE TEL
Craig White
2004-Jul-12 01:18 UTC
[Samba] smbldap-tools, setting password on command line?
On Sun, 2004-07-11 at 13:33, malte.mueller@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
Jérôme Tournier
2004-Jul-12 08:22 UTC
[Samba] smbldap-tools, setting password on command line?
Le Sun, Jul 11, 2004 at 10:33:58PM +0200, malte.mueller@ewetel.net a ecrit:> 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 < testpassesYou can use (with 0.8.5 or you'll have error messages with older version, altought it should work) echo -e 'password\npassword' | smbldap-passwd testuser2 -- J?r?me