1

Our Server has disabled password-based ssh login and only works with publickey. When I add new users with adduser, it prompts for a password however and I cannot leave it empty. When I generate a random one and mail it to users, even with the notice that they don't need it, people get confused and write me mails that they can't login with their password.

So what is best practise here?

  • set the password once, forget it and and don't tell them
  • use a different command to create a user with no password at all
  • continue giving them the password in case they need it for something (e.g. get sudo access later which is unlikely however)
  • Why would you mail the password to your users, then? – Matthias Urlichs Jan 24 '14 at 11:17
3

If they have no immediate need, create the password, make it a long random string, and toss it. If they do need a password in the future, change it later on.

  • I marked this as correct because it seems more secure to me in case someone changes the ssh settings and permits password login. – Konrad Höffner Jan 25 '14 at 16:30
3

Use adduser --disabled-password.

  • Ah great I didn't know that option! – Konrad Höffner Jan 25 '14 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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