Solved

user login allowed in ubuntu

Posted on 2012-03-17
4
343 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 30

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

696 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