Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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.

share|improve this answer
2  
passwd -l does the same thing, additionally. –  Daenyth Jun 23 '10 at 13:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.