jonas.norlander at ovikonline.com
Wed Jan 26 04:28:17 PST 2005
On Wed, Jan 26, 2005 at 12:26:25AM -0500, Robert Connolly wrote:
> Is anyone interested in having an /sbin/nologin(8) ? This is an alternative
> to /bin/false, but while false(1) displays nothing and returns 1, nologin can
> display a hardcoded message, or one from /etc/nologin.txt, and return 1.
> Both false and nologin are equally safe to use. nologin is intended to let
> users know an account is disabled instead of giving them no explanation,
> assuming they get the password right.
> Some distro's patch this into util-linux. Its a simple program:
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <unistd.h>
> #define DEFAULT_MESG "This account is currently not available.\n"
> int main(int argc, char *argv)
> write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG));
> exit (1);
> Its no big deal, and really just a vanity thing. But nologin is more suitable
> for use with login rejection than what false does. It would only really get
> used if root tried 'su - sshd', or if you choose to disable a real account.
I always missed this program when i switched to LFS
More information about the hlfs-dev