In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use the nologin command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Linux common command nologin command can politely refuse users to log on to the system and give information at the same time.
Nologin refuses users to log in to the system
Add that if you try to log in as this type of user, add a record in log, and then output This account is currently not available information on the terminal, and that's it. Generally, such an account is set up for the account that starts the service, which only allows the service to start, but cannot log in to the system.
Syntax nologin instance Linux prohibits users from logging in:
After the user is prohibited from logging in, the user cannot log in to the system, but can log in to ftp, SAMBA, and so on. When we do system maintenance under Linux, we hope that individual users or all users can not log on to the system to ensure the normal operation of the system during maintenance. At this time, we will prohibit users from logging in.
1. Prohibit individual users from logging in, such as lynn users.
Passwd-l lynn this means locking out the lynn user so that the user cannot log in.
Passwd-u lynn above is to unlock the locked user lynn, and the user can log in.
2. We modify the shell logged in by the user in the / etc/passwd file
Vi / etc/passwd is changed to:
Lynn:x:500:500::/home/lynn:/sbin/nologin the user will not be able to log in.
3. All users are prohibited from logging in.
Touch / etc/nologin users other than root cannot log in.
Thank you for reading! This is the end of the article on "how to use nologin commands in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.