LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-16-2012, 06:02 PM   #1
mad_penguin
Member
 
Registered: Mar 2008
Posts: 69

Rep: Reputation: 15
/bin/ps for regular user


Hi

Is there any way of giving a regular Linux user the right to use /bin/ps as root has? I mean if I run ps under some regular use I can only see the processes running under that user.
I'm aware that I can put this user into sudoers but I don't wanna do that. I just want this user to be able to check processes (all of them).

ls -la /bin/ps
-r-xr-xr-x 1 root root 95684 May 4 2011 /bin/ps

Thanks.
 
Old 07-16-2012, 06:09 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Use "ps -e"
 
Old 07-16-2012, 06:11 PM   #3
mad_penguin
Member
 
Registered: Mar 2008
Posts: 69

Original Poster
Rep: Reputation: 15
Hm ... sry, seems that it won't show 'all', just those from the above.

PID TTY TIME CMD
14819 pts/1 00:00:00 su
14820 pts/1 00:00:00 bash
14825 pts/1 00:00:00 ps
32601 ? 00:00:00 sshd
32602 pts/0 00:00:00 bash
 
Old 07-16-2012, 06:12 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
What system is this?
 
Old 07-16-2012, 06:24 PM   #5
mad_penguin
Member
 
Registered: Mar 2008
Posts: 69

Original Poster
Rep: Reputation: 15
gentoo
 
Old 07-16-2012, 06:35 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Never used gentoo, but ps -e works on all of the systems I have access to. Check "man ps" and see what the flags are for your system.
 
Old 07-16-2012, 06:42 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by mad_penguin View Post
if I run ps under some regular use I can only see the processes running under that user.
This is not typical 'ps' behaviour. Does your Gentoo run a standard 'ps' binary or not? Does your Gentoo run some sort of MAC like GRSecurity? Anything like library preloaders or anything else we should know about? (In the worst case you could run something like 'strace -f -ff -v -s 1024 -o /tmp/ps.log /bin/ps axf' as that user and attach the output as plain text.)


Quote:
Originally Posted by mad_penguin View Post
I'm aware that I can put this user into sudoers but I don't wanna do that.
And what are your valid and compelling reasons for not wanting easily configurable, maintainable and fine-grained control?
 
Old 07-16-2012, 06:47 PM   #8
mad_penguin
Member
 
Registered: Mar 2008
Posts: 69

Original Poster
Rep: Reputation: 15
Hm .. nope, it ain't workin' Tried though ...

Thanks suicidaleggroll. Indeed, I also have a few other linux boxes, Ubuntu, Debian ... and I can run ps and see all processes, just fine.

Anyone has any other idea ? How can this be done without adding the user to sudoers ?
 
Old 07-16-2012, 07:18 PM   #9
mad_penguin
Member
 
Registered: Mar 2008
Posts: 69

Original Poster
Rep: Reputation: 15
unSpawn, thanks for answering.

I've had a second though and there's no reason for not using sudoers. I'm gonna add this user into sudoers and allow him to run only ps command.

Thanks a lot.
 
  


Reply



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
[SOLVED] Different date shown for regular user and root user tuxtutorials Linux - Server 6 11-27-2013 08:33 AM
difference between regular user and system user (and groups) kushalkoolwal Linux - General 1 09-28-2010 04:25 PM
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 10:30 AM
Can't Login As Regular User After Trying... drdroid Linux - General 8 02-08-2004 11:30 AM
Can't log in as regular user Fugazi Linux - Newbie 1 12-27-2003 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration