Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-08-2013, 04:34 AM   #1
LQ Newbie
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
How to check local accounts have root and user access rights ?


I have three servers,For 3 servers how i can take output,all the local accounts and details of whether the access is Root or User access.

Old 01-08-2013, 04:38 AM   #2
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 678

Rep: Reputation: 105Reputation: 105
in /etc/passwd you check the UID; if it's 0, it's "root" access, otherwise User...
That is: in traditional Linux style.

If you're using seclinux things differ, probably...
Old 01-08-2013, 04:58 AM   #3
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Originally Posted by Ramurd View Post
in /etc/passwd you check the UID; if it's 0, it's "root" access, otherwise User
Check for numerically equal to 0 because :00: is a zero value not identical as a string to :0: .

As for what accounts have access to root if they do something .. there is a great amount to check including file owners/groups/modes for all s/w run as root to ensure the user cannot replace it. (e.g. Red Hat ships rpm s/w owned by rpm rather than root even when everybody knows root runs rpm.)

Unpatched s/w might give root access to all local users; or even remote users.

Rules in sudoers need to be examined. Commands that run shells and commands that write files are dangerous.

Networking trust (rlogin/shell/NFS).
Old 01-08-2013, 05:03 AM   #4
Senior Member
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,271

Rep: Reputation: 1298Reputation: 1298Reputation: 1298Reputation: 1298Reputation: 1298Reputation: 1298Reputation: 1298Reputation: 1298Reputation: 1298
Definitely, check the /etc/sudoers file and see what groups each of the users on those systems belong to.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ codes to check whether user is root or has admin rights in Linux cshong Programming 4 01-08-2011 02:01 PM
giving AD user local admin rights in Ubuntu zepphead5 Linux - Server 2 07-18-2009 03:22 PM
Need to make local user account with administrative rights wilmapayne Other *NIX 2 04-22-2009 09:24 AM
Can't access /root/.local as normal user dodle Linux - General 2 04-11-2009 10:39 PM
I can not login to any local users accounts, except root. jbirtwell Linux - General 7 08-25-2003 04:33 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration