Solved

user login allowed in ubuntu

Posted on 2012-03-17
4
335 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 27

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

13 Experts available now in Live!

Get 1:1 Help Now