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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-16-2012, 07:02 PM
|
#1
|
Member
Registered: Mar 2008
Posts: 69
Rep:
|
/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.
|
|
|
07-16-2012, 07:09 PM
|
#2
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Use "ps -e"
|
|
|
07-16-2012, 07:11 PM
|
#3
|
Member
Registered: Mar 2008
Posts: 69
Original Poster
Rep:
|
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
|
|
|
07-16-2012, 07:12 PM
|
#4
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
What system is this?
|
|
|
07-16-2012, 07:24 PM
|
#5
|
Member
Registered: Mar 2008
Posts: 69
Original Poster
Rep:
|
gentoo
|
|
|
07-16-2012, 07:35 PM
|
#6
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
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.
|
|
|
07-16-2012, 07:42 PM
|
#7
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by mad_penguin
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
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?
|
|
|
07-16-2012, 07:47 PM
|
#8
|
Member
Registered: Mar 2008
Posts: 69
Original Poster
Rep:
|
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 ?
|
|
|
07-16-2012, 08:18 PM
|
#9
|
Member
Registered: Mar 2008
Posts: 69
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|