HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ps -ef
Operating System - HP-UX
1836596
Members
1842
Online
110102
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2001 08:22 AM
02-08-2001 08:22 AM
ps -ef
What change can I make on a HP-9000 sever running OS 10.20 that will only allow users to see their own process when doing a ps -ef command. I do not wish general users to have access to see all processes system or other users.
R-
R-
UNIX System Administrator
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2001 08:42 AM
02-08-2001 08:42 AM
Re: ps -ef
So many ways to answer this...here's just one:
You could set up a small script in their .profile that runs as soon as they login and gives them options to choose what you want to allow them do to...within the script when they select the ps -ef option it would grep and only extract their jobs...
/rcw
You could set up a small script in their .profile that runs as soon as they login and gives them options to choose what you want to allow them do to...within the script when they select the ps -ef option it would grep and only extract their jobs...
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2001 02:10 PM
02-08-2001 02:10 PM
Re: ps -ef
Richard:
Here's one way [if you can take (and keep)control of the user's profile].
Add to the user's profile at the end, the following:
# function ps
# {
# if [ $# -eq 0 ]
# then
# command ps
# else
# command ps $@|grep $LOGNAME
# fi
# }
This will allow the user to do the 'ps' command with or without options but will show only processes associated with him/her.
...JRF...
Here's one way [if you can take (and keep)control of the user's profile].
Add to the user's profile at the end, the following:
# function ps
# {
# if [ $# -eq 0 ]
# then
# command ps
# else
# command ps $@|grep $LOGNAME
# fi
# }
This will allow the user to do the 'ps' command with or without options but will show only processes associated with him/her.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2001 01:23 PM
02-10-2001 01:23 PM
Re: ps -ef
Hello Richard,
just move the "ps" codefile aside to something like
"/usr/bin/ps2" and change group to a new group
like "psgrp". Then change permissions to make it
executable only for that group, i.e. "chmod 710 ps2".
Now create a shell-script in the place of the old "ps",
permissions "2551", i.e. SGID and owned by group
"psgrp" and a content like that:
#!/usr/bin/sh
usage() {
echo "illegal parameter: -u|-e are not allowed" >&2
exit 1;
}
args=""
while [ $# -gt 0 ]; do
case "$1" in
-*e*| -*u*) usage ;;
-*| *) args="$args $1" ;;
esac
shift
done
/usr/bin/ps2 -u $(logname) $args
# end of script
It is not bullet proof but should give you an idea ;-)
The only "dangerous" options would be "-e" (each
process) and "-u username", the rest is ok. And call
it with "-u $(logname)" to make shure your user is
able to see his/her own processes in different sessions!
HTH,
Wodisch
just move the "ps" codefile aside to something like
"/usr/bin/ps2" and change group to a new group
like "psgrp". Then change permissions to make it
executable only for that group, i.e. "chmod 710 ps2".
Now create a shell-script in the place of the old "ps",
permissions "2551", i.e. SGID and owned by group
"psgrp" and a content like that:
#!/usr/bin/sh
usage() {
echo "illegal parameter: -u|-e are not allowed" >&2
exit 1;
}
args=""
while [ $# -gt 0 ]; do
case "$1" in
-*e*| -*u*) usage ;;
-*| *) args="$args $1" ;;
esac
shift
done
/usr/bin/ps2 -u $(logname) $args
# end of script
It is not bullet proof but should give you an idea ;-)
The only "dangerous" options would be "-e" (each
process) and "-u username", the rest is ok. And call
it with "-u $(logname)" to make shure your user is
able to see his/her own processes in different sessions!
HTH,
Wodisch
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP