14 comment

  1. On a Debian system, the nologin file does not exist. Is this a file that I can create? If so, do I stick it in /etc? Do I have to link it to a file in /sbin? Also, what should be the contents of the file?


    1. By the way, the command chsh is designed for changing shell (instead of using usermod)

      e.g. :
      chsh -s /bin/false tom

  2. Zach,

    Good question.

    Use /bin/false on Debian or Ubuntu Linux system. Both /sbin/nologin and /bin/false are binary file. Don’t softlink them with shell/perl script.

    usermod -s /bin/false tom

  3. Hello,

    I have CentOS on dedicated server with Cpanel/WHM installed.

    I want more people to have access to Cpanel, but to disable main ftp domain access because if they FTP with the cpanel user/pass they will be able to access the folder MAIL.

    What I did so far: I chaged the Cpanel/username password by: ssh passwd , this way the FTP password remained as the old one. This was a solution, because people were not able to use FTP with the Cpanel password. However, in 24h the FTP password was automatically synchonized with the Cpanel password – it became the same as cpanel password.

    1. How to disable main domain ftp access for Cpanel user?
    2. Maybe there is a way to disable automatic ftp password synchronization?

    Thanks in advance!!!

  4. I was thinking about the main ftp account, that has access in the direcory that is one level up from public_html. There is no option in Cpanel to change this ftp account password.

  5. Use a nologin/false shell is a quick solution to disable login completely. However, there are needs to only allow login from certain location, say only locally. Linux-PAM would allow a much finer grain login control. Check out ‘man access.conf’. It is pretty useful when you have very specific login restrictions.

  6. I need a fix like this, that still allows the user to access vsftpd. I’ve looked around and it looks like installing some kind of secure shell is my only option. I’m hoping you may know a way that’s as easy as this modification. Thanks in advance.

    1. @jason,

      Make sure that this line is present in your /etc/pam.d/vsftpd:

      auth required pam_shells.so

      This will force users to have a valid shell to log in.
      If you set a users shell to /bin/false or /sbin/nologin then FTP logins will not be allowed also.


  7. need gdm/kdm/xdm (graphical) login for user but still he wont login via shell .. is it possible ?

    Have a question? Post it on our forum!