0

Is it possible to remove users password on ubuntu? The user only needs access through ssh and he can use key file authentication so he doesn't need the password anymore. I'd rather not disable logging through ssh with passwords completely, just remove the password for this user. When creating access for new users to the computer I like to set up a password for them until they can setup their ssh key.

The computer is ubuntu 8.04

1 Answer 1

7

try usermod's -L flag:

-L, --lock

Lock a user's password. This puts a '!' in front of the encrypted password, effectively disabling the password. You can't use this option with -p or -U.

1
  • 3
    passwd -l does the same thing, additionally.
    – Daenyth
    Jun 23, 2010 at 13:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .