Link to home
Create AccountLog in
Avatar of Luis N
Luis NFlag for Spain

asked on

user login allowed in ubuntu

In Ubuntu, How can I check which users has the rights to login allowed ?

Can I see it in the passwd file?

The question is how can I see if a user account has the right to login in the usual login page

Thanks
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
If the users users ssh keys, then the leading ! in /etc/shadow doesn't actually lock them out from remote access.  It only blocks password access.  A fully locked out user has both the leading ! and an invalid login shell, or just a commented out password entry.
Yes, /etc/passwd file gives you access right for every user unless the users are allowed through SSH authorization.
Even SSH relies on /etc/passwd and /etc/shadow mechanism except in case of ssh public/private key certificates in which case, it would bypass passwords completely.  But in this case there would be ~/.ssh/authorized_keys file with public part of certificates.