diff --git a/usr.bin/login/login.1 b/usr.bin/login/login.1 index cbf57d16032..c16d1a9041d 100644 --- a/usr.bin/login/login.1 +++ b/usr.bin/login/login.1 @@ -95,6 +95,8 @@ exists, .Nm login checks to see if the user and host pair are specifically allowed or denied access. +Login access may also be controlled via the login class, which provides +allow and deny records based on time, tty and remote host name. .Pp If the file .Pa /etc/fbtab @@ -124,6 +126,12 @@ Login enters information into the environment (see specifying the user's home directory (HOME), command interpreter (SHELL), search path (PATH), terminal type (TERM) and user name (both LOGNAME and USER). +Other environment variables may be set due to entries in the login +class capabilities database, for the login class assigned in the +user's system passwd record. +The login class also controls the maximum and current process resource +limits granted to a login, process priorities and many other aspects of +a user's login environment. .Pp The standard shells, .Xr csh 1 @@ -136,6 +144,8 @@ utility. .Bl -tag -width /var/mail/userXXX -compact .It Pa /etc/fbtab changes device protections +.It Pa /etc/login.conf +login class capabilities database .It Pa /etc/motd message-of-the-day .It Pa /etc/nologin @@ -158,6 +168,7 @@ makes login quieter .Xr getpass 3 , .Xr fbtab 5 , .Xr login.access 5 , +.Xr login.conf 5 , .Xr utmp 5 , .Xr environ 7 , .Xr nologin 8 diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index ab9e00fe737..a02a86d51ee 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -658,8 +658,11 @@ main(argc, argv) (void)setuid(rootlogin ? 0 : pwd->pw_uid); #endif - if (*pwd->pw_shell == '\0') + if (*pwd->pw_shell == '\0') { pwd->pw_shell = _PATH_BSHELL; + if (*shell == '\0') /* Not overridden */ + strcpy(shell, pwd->pw_shell); + } (void)setenv("SHELL", pwd->pw_shell, 1); (void)setenv("HOME", pwd->pw_dir, 1); if (term[0] != '\0')