diff options
author | Karel Zak | 2009-03-17 21:00:42 +0100 |
---|---|---|
committer | Karel Zak | 2009-03-17 21:00:42 +0100 |
commit | 067f5343c86ed6dd135cdf57eb99aa3f982fceed (patch) | |
tree | e24b833d194cb5afc32733310dec34232e85ebde | |
parent | blkid: fix ocfs2 detection (diff) | |
download | kernel-qcow2-util-linux-067f5343c86ed6dd135cdf57eb99aa3f982fceed.tar.gz kernel-qcow2-util-linux-067f5343c86ed6dd135cdf57eb99aa3f982fceed.tar.xz kernel-qcow2-util-linux-067f5343c86ed6dd135cdf57eb99aa3f982fceed.zip |
login: use "remote" as a PAM service name for "login -h"
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | login-utils/login.1 | 10 | ||||
-rw-r--r-- | login-utils/login.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/login-utils/login.1 b/login-utils/login.1 index 9ddf25b3d..122738159 100644 --- a/login-utils/login.1 +++ b/login-utils/login.1 @@ -105,6 +105,14 @@ to pass the name of the remote host to so that it may be placed in utmp and wtmp. Only the superuser may use this option. +Note that the \fB-h\fP option has impact on the \fBPAM service name\fP. The standard +service name is "login", with the \fB-h\fP option the name is "remote". It's +necessary to create a proper PAM config files (e.g. +.I /etc/pam.d/login +and +.I /etc/pam.d/remote +). + .SH "SPECIAL ACCESS RESTRICTIONS" The file .I /etc/securetty @@ -297,6 +305,8 @@ are allowed to log in from anywhere as is standard behavior. .I /etc/passwd .I /etc/nologin .I /etc/usertty +.I /etc/pam.d/login +.I /etc/pam.d/remote .I .hushlogin .fi .SH "SEE ALSO" diff --git a/login-utils/login.c b/login-utils/login.c index d36211358..c924a1f5d 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -552,7 +552,7 @@ main(int argc, char **argv) * Therefore, we are safe not setting it to anything */ - retcode = pam_start("login",username, &conv, &pamh); + retcode = pam_start(hflag?"remote":"login",username, &conv, &pamh); if(retcode != PAM_SUCCESS) { fprintf(stderr, _("%s: PAM failure, aborting: %s\n"), "login", pam_strerror(pamh, retcode)); |