to tell
.B login
that printing the hostname should be suppressed in the login: prompt.
+See also LOGIN_PLAIN_PROMPT below if your server does not allow to configure
+.B login
+command line.
.TP
\fB\-\-help\fR
Display help text and exit.
PAM module.
.RE
.PP
+.B LOGIN_PLAIN_PROMPT
+(boolean)
+.RS 4
+Tell login that printing the hostname should be suppressed in the login:
+prompt. This is alternative to the \fB\-H\fR command line option. The default
+value is
+.IR no .
+.RE
+.PP
.B LOGIN_TIMEOUT
(number)
.RS 4
}
/*
- * Composes "<host> login: " string; or returns "login: " if -H is given.
+ * Composes "<host> login: " string; or returns "login: " if -H is given or
+ * LOGIN_PLAIN_PROMPT=yes configured.
*/
static const char *loginpam_get_prompt(struct login_context *cxt)
{
char *prompt, *dflt_prompt = _("login: ");
size_t sz;
- if (cxt->nohost || !(host = get_thishost(cxt, NULL)))
+ if (cxt->nohost)
+ return dflt_prompt; /* -H on command line */
+
+ if (getlogindefs_bool("LOGIN_PLAIN_PROMPT", 0) == 1)
return dflt_prompt;
- sz = strlen(host) + 1 + strlen(dflt_prompt) + 1;
+ if (!(host = get_thishost(cxt, NULL)))
+ return dflt_prompt;
+ sz = strlen(host) + 1 + strlen(dflt_prompt) + 1;
prompt = xmalloc(sz);
snprintf(prompt, sz, "%s %s", host, dflt_prompt);