How do i completely disable an account? passwd -l will not allow anyone to log into an account using a password but you can still log in via private/public keys. How would i disable the account completely? As a quickfix i renamed the file to authorized_keys_lockme. Is there another way?
|
|
The correct way according to
(Actually, the argument to Explanation:
I've tested this on my machine. Neither login with password nor public key is possible after executing this command. |
|||
|
|
|
Lock the password and change the shell to
(Or more concisely, |
|||||||||||||||||||
|
|
To delete entirely it use Please note that if you delete an account there is a risk that its user ID will still be used in the file system somewhere and a new user would inherit ownership of those files if it came in under that same user id. You would want to change the owner of any files that are owned by the deleted user. If you would like to add the user back later, save its lines from That way when you add it back you can use the same user id and the same password (which is encrypted in one of the above files) Disclaimer: I learned UNIX on my own so I would not be surprised if there is a better way to temporarily disable the user. In fact I don't even know what the private/public keys are you are talking about. Also I am sure there is a |
|||||
|
|
Has anyone tried doing it via ssh_config? Maybe this could help http://www.techrepublic.com/blog/opensource/set-up-user-accounts-quickly-and-securely/86
|
|||
|
|