[SOLVED] What is the different between "*" "!!" and "/sbin/nologin"? Thanks!!
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What is the different between "*" "!!" and "/sbin/nologin"? Thanks!!
I am a really newbie to linux, I would like to know how to determine an account cannot login to system in any way. I found at the /etc/passwd file, if the default shell of an account is /sbin/nologin, it cannot telnet or login interactively, but like 'FTP' account, I can login through FTP Client, so can I say the 'FTP' account is locked??
Then at /etc/shadow, I found the password field of an account may contain '!!' or '*', I searched for reference know that '!!' means password is locked and '*' means password is disabled, so can an account with '!!' or '*' login to system interactively or through ways like FTP??
well notations like !! and * just make the password string impossible to ever match. the passwd is a sha or md5 string encrypted version of the original password, and those strings can never contain those characters, therefore the account is implictly "locked". Note that there is no formal explicit locking, i.e. there is no "Locked" field in the file, you just basically break the account in a controlled way. Locked and disabled are interchangeable, there's no difference.
As for nologin, no the account is not locked, as it is working absolutely fine, and even with nologin as your shell, you DO login, but terminate immediately due to the behaviour of the chosen (non) shell. so if you don't need a shell as the result of the authentication, you do still log in correctly. terminology aroun "FTP accounts" is very vague, sometimes they just mean an account like you are referring to, which I would say is the wrong way to describe it, as opposed to a seperate user account list held purely for the FTP server, which would be much more like a genuine "FTP Only" user.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.