Difference prohibit user login / bin / false and / sbin / nologin of

The difference between 1 
/ bin / false is the most stringent ban login option, all the services are not used. If you want to allow ftp with false at the same time prohibit login, you must add a line / bin in / etc / shells in / false.


/ Sbin / nologin just does not allow login system, you can use other ftp services.

 

 
Tip: 
Check / etc / passwd file, each user can see the shell of 
 
2.1 nologin 
when the user is configured to / sbin / nologin, if the user then use ssh to the linux operating system, you will be prompted 
This account is currently not available. 
 
 
2.2 false 
when configured user / bin / false, after the display ssh below 
the root vultr @: ~ # the useradd -s / bin / -M -N user111 to false
the root vultr @: ~ # SU user111
the root vultr @: ~ # the whoami
the root

there will be no prompt the user to switch is not the past

 

 

Guess you like

Origin www.cnblogs.com/bulh/p/10984172.html