LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

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

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


Hi,

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.

cheers
 
Old 01-08-2013, 03:38 AM   #2
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
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, 03:58 AM   #3
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 783
Blog Entries: 2

Rep: Reputation: 199Reputation: 199
Quote:
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, 04:03 AM   #4
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,856

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


Reply


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 01:01 PM
giving AD user local admin rights in Ubuntu zepphead5 Linux - Server 2 07-18-2009 02:22 PM
Need to make local user account with administrative rights wilmapayne Other *NIX 2 04-22-2009 08:24 AM
Can't access /root/.local as normal user dodle Linux - General 2 04-11-2009 09:39 PM
I can not login to any local users accounts, except root. jbirtwell Linux - General 7 08-25-2003 03:33 PM


All times are GMT -5. The time now is 11:39 PM.

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