Solved

user login allowed in ubuntu

Posted on 2012-03-17
4
337 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:lnrivera
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 37733742
You can do a number of checks.  See /etc/shadow file and see which users have a password hash without  a leading !.

Get the list of those users and run the following command

chage -l userID
The above option is lower case L.
Also, see if the user has a valid login shell.  If he doesn't, it would keep logging him through command line login.
0
 
LVL 28

Expert Comment

by:serialband
ID: 37735886
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.
0
 
LVL 5

Expert Comment

by:1ly4me
ID: 37736892
Yes, /etc/passwd file gives you access right for every user unless the users are allowed through SSH authorization.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37737253
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LINUX CENTOS + APACHE 9 63
cannot connect to openvpn server 9 60
nagios remote hosts 9 46
how can I get powershell to show the history of commands used ? 10 45
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now