During system maintenance, we hope that individual users or all users cannot log on to the system to ensure normal system operation during maintenance. In this case, users are prohibited from logging on.
1. Individual users are prohibited from logging on. For example, you cannot Log On As A lynn user. Passwd-l lynn means to lock the lynn user so that the user cannot log on. Passwd-u lynn unlocks the Locked User lynn, and the user can log on.
2. Modify the shellvi/etc/passwdroot: x: 0: 0: root:/bin/bashbin: x: 1: 1: bin:/sbin/nologindaemon: x: 2: 2: daemon:/sbin/nologinadm: x: 3: 4: adm: /var/adm:/sbin/nologinlp: x: 4: 7: lp:/var/spool/lpd:/sbin/nologinsync: x: 5: 0: sync: /sbin:/bin/syncshutdown: x: 6: 0: shutdown:/sbin/shutdownhalt: x: 7: 0: halt:/sbin/haltmail: x: 8: 12: mail:/var/spool/mail:/sbin/nologinuucp: x: 10: 14: uucp:/var/s Pool/uucp:/sbin/nologinoperator: x: 11: 0: operator:/root:/sbin/nologingames: x: 12: 100: games:/usr/games: /sbin/nologinlynn: x: 500: 500:/home/lynn:/bin/bash changed to: lynn: x: 500: 500:/home/lynn: /sbin/nologin the user cannot log on.
3. All users are prohibited from logging on. Users other than the root user cannot log on to touch/etc/nologin. Author qinggzha