[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Telling pam that the login prompt is username, not login



See

http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_modules-2.html#pam-get-user

Red Hat replace the default of "Please enter username: " with "login: ".
You need to override this.  You can do this by inserting the following
line:

	pam_set_item(pamh, PAM_USER_PROMPT, "username: ");

somewhere before the user gets prompted.  (In the application, this
would be before the pam_authenticate() line.  In the module it would
be before the pam_get_user() call.  Alternatively, you could make an
authentication module that simply sets this variable to the value you
want and then returns with PAM_IGNORE.  Then, when you want a
different default, you would just insert your module before the
pam_pwdb module [only needed before the 'auth' use of pam_pwdb].)

I hope this helps.  I hope it was more explicit than last time. ;)

Cheers

Andrew

Richard Sharpe writes:
> Hi, 
> 
> I have asked this before but the answer was a pointer to the implementers
> documentation (a perhaps too subtle hint :-)
> 
> I have had to change the login prompt on a RH5.0 system to username. This I
> accomplished by changing things in /etc/gettydefs or some such file.
> 
> This works OK, until the user makes a mistake in typing in their username
> or password (or the modems lose a few chars) and the system reprompts. By
> then, PAM has control, and the hard-coded 'login:' prompt is issued.
> 
> This screws up my dial-up scripts ... Which seem not to be able to look for
> two types of prompts.
> 
> Is there a simple parameter I can pass to pam on the pam_pwdb line to tell
> it to prompt with a different prompt? At the moment it takes the parameters
> shaddow and nullok.
> 
> Any help appreciated.
> 
> 
> Regards
> -------
> Richard Sharpe, sharpe@ns.aus.com, NIC-Handle:RJS96
> NS Computer Software and Services P/L, 
> Ph: +61-8-8281-0063, FAX: +61-8-8250-2080, 
> Samba, Linux, Apache, Digital UNIX, AIX, Netscape, Stronghold, C, ...
> 
> -- 
> To unsubscribe: mail -s unsubscribe pam-list-request@redhat.com < /dev/null



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []