Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    shell set no login ?

    Hello, I was installing vsftpd and I came across the following instructions. Can someone please explain what is actually happening here. I understand what shells are but don't fully understand what is going on here with this command etc. '/usr/sbin/nologin' as mentioned below.
    Could someone please explain it to me in newbie terms ?

    "After completing all these procedures it is almost ready to use it, give it a try but you will get a 500 OOPS permission denied error. To fix it you need to add a nologin to the shell set.
    vi /etc/shells
    The file should look like this:

    Add this line at the end:

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Harrow, UK
    When you log in to Linux, the login program checks that your user name is in the /etc/passwd file and that you have given the correct password. It then looks in this file to see what shell you are using (default is bash), and launches it. Valid shells must be listed in /etc/shells.

    There are some system (fictitious) users who must not be allowed to log in - if someone logs in in one of these names, he's a cracker! In addition, a real user might have his account disabled. The nologin program simply prints a polite message to the effect that you are not allowed to log in and then terminates. Setting nologin as the shell for some accounts ensures that these users effectively can't log in.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    The details of a user are stored in /etc/passwd file and /etc/shadow file. Open /etc/passwd file and look on the last column. This is the login shell. By default user will get /bin/bash login shell. But we can change this using the command
    usermod -s username loginshell
    . You can also change this by editing the /etc/passwd file. The /sbin/nologin is used to prevent the users from login into the system. They are generally used to temporary lock an user.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts