Which command is used to lock a user's account in Linux?
- passwd -l
- usermod -L
- lockuser -u
- userlock -a
The correct command to lock a user's account in Linux is passwd -l. This command will place an "!" in front of the user's password hash in the /etc/shadow file, preventing them from logging in. It's a security measure to temporarily or permanently disable a user's account.
Loading...
Related Quiz
- When troubleshooting a network interface in promiscuous mode, you might use the ________ command.
- The _________ directory in Linux is typically used for transient or temporary data, often cleared during boot.
- You've been tasked with setting up static IP configurations for multiple interfaces on a Linux server. In which directory and/or file would you primarily focus your configuration efforts?
- You are setting up a new server and need to ensure that only specific users can SSH into the machine. Which configuration file would you modify to achieve this?
- You have been tasked to allow only a specific IP address to connect to your SSH server. Which tool or method would be best suited to achieve this?