Re: [Cpu-users] Error when trying to add a user password interactively
Brought to you by:
matheny
From: Blake M. <bma...@pu...> - 2003-09-27 02:52:02
|
I *think* I figured out what is going on here. From the getpass man page: "The function getpass returns a pointer to a static buffer containing the password without the trailing newline, terminated by a NULL. This buffer may be overwritten by a following call." Since getpass is being called more than once, I think the buffer is being overwritten. Elsewhere in the man page it says: "This function is obsolete. Do not use it." So I implemented a new version of it that doesn't use a static buffer. Could you check out the CVS version of cpu and let me know if it fixed your problem? Also, let me know if adding a user is faster for you. There is no more GRAB* options, it just defaults to doing that unless random is true. -Blake Whatchu talkin' 'bout, Willis? > Well if I putting in the wrong password I am doing it consistently with > one way of setting the user password and not the other. > > root@llama /usr/local/src# cpu -w useradd -p test > Please enter the LDAP bind password: > Please enter desired user password: > > ldap: ldapOperation: ldap_bind_s: Invalid credentials (49) > ldap: CPU_init: Error in ldapOperation. > Something went wrong. Exiting. > You have new mail in /var/spool/mail/root > root@llama /usr/local/src# cpu -w useradd -p test > Please enter the LDAP bind password: > Please enter desired user password: > -- Blake Matheny "... one of the main causes of the fall of the bma...@pu... Roman Empire was that, lacking zero, they had http://www.mkfifo.net no way to indicate successful termination of http://ovmj.org/GNUnet/ their C programs." --Robert Firth |