A colleague asks you to temporarily disable a user's access without deleting their account. Which Linux command allows you to achieve this?

  • passwd -l
  • userdel
  • chmod 000
  • usermod -s /sbin/nologin
To temporarily disable a user's access without deleting their account, you can use the 'passwd -l' command. This locks the user's password, preventing them from logging in until the password is unlocked.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *