When we do system maintenance, we hope that individual users or all users cannot log in to the system to ensure that the system runs normally during maintenance. At this time we have to prohibit users from logging in.
1. It is forbidden to log in by individual users. For example, lynn users are prohibited from logging in.
passwd -l lynn
This means locking the lynn user so that the user cannot log in.
passwd -u lynn
Unlock the locked user lynn and the user can log in.
2, we modify the /etc/passwd file in the user login shell
vi /etc/passwd
root:x:0:0:root:/root :/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/Nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/Sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown< Br>
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin< Br>
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin< Br>
games:x:12:100:games:/usr/games:/sbin/nologin
lynn:x:500:500::/home/lynn:/bin/bash
Change to:
lynn:x:500:500::/home/lynn:/sbin/nologin
The user cannot log in.
3. All users are prohibited from logging in.
touch /etc/nologin
Users other than root cannot log in.
That day, my colleague showed me an operation step on my computer, using an env command, well, I adm
CentOS modify IP address First turn off the firewall: service iptables stop# ifconfig eth0 192.168.1
Preparation before erection: To set up a DNS server, you must install a software program that provi
What is the boot process for Linux? How to complete the system startup through grub boot? These pro
RHEL6 builds a YFT source server based on vsftd
Startup tutorial for multiple Oracle instances under Linux platform
Linux System Application Installation Guide
Several ways to load Windows partitions
Tar encountered error: "Error exit delayed from previous errors" several problems
How to find the zombie process and Kill, can't kill the parent process and kill
The df/hdparm command under Linux
Ubuntu Linux 8.04 Settings and Optimization
Scanning and Printing Implementation in Linux System
How to modify the win7 system property logo?
How to modify the default shortcut key of Win7
Win7 wireless network connection limited solution
Two methods for handling Win8 thumbnails are unclear. The
How does the Win8 system change the font size of the title bar?
Group Policy Set Win8 Account Login Error Limit and Lock Time
What does wcdma mean? What network is wcdma? What card is wcdma?
18 kinds of non-mainstream flash pictures Meitu Xiuxiu one button to get
How to install the official version of win10? Win10 installation method introduction