GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ps does not show effective uid
Operating System - HP-UX
1850277
Members
3229
Online
104053
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
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-10-2004 08:38 PM
02-10-2004 08:38 PM
ps does not show effective uid
Hi,
I am seeing a problem with 'ps' utility when a program changes its effective UID and GID.
It does not show changed effective UID, instead it shows the original (probably real) UID.
Though, the UID change is successful and any file created by the program has owenership of effective UID.
Any explainations to the problem?
I have HP-UX 11.11i.
Attached a sample test program which changes the UID to 'rohan' and waits for input before exit. Following is 'ps' output when the program is waiting,
bash-2.05b# ps -aef|grep test_sw
root 13895 2904 1 14:49:32 pts/td 0:00 grep test_sw
root 13876 14520 0 14:48:45 pts/tg 0:00 ./test_sw_uid
Thanks in advance
Rohan
I am seeing a problem with 'ps' utility when a program changes its effective UID and GID.
It does not show changed effective UID, instead it shows the original (probably real) UID.
Though, the UID change is successful and any file created by the program has owenership of effective UID.
Any explainations to the problem?
I have HP-UX 11.11i.
Attached a sample test program which changes the UID to 'rohan' and waits for input before exit. Following is 'ps' output when the program is waiting,
bash-2.05b# ps -aef|grep test_sw
root 13895 2904 1 14:49:32 pts/td 0:00 grep test_sw
root 13876 14520 0 14:48:45 pts/tg 0:00 ./test_sw_uid
Thanks in advance
Rohan
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 08:42 PM
02-10-2004 08:42 PM
Re: ps does not show effective uid
Hi Rohan,
You could use -u or -U :
-u uidlist Select processes whose effective user ID numbers
or login names are given in uidlist.
-U uidlist (XPG4 Only.) Select processes whose real user ID
numbers or login names are given in uidlist.
HTH,
Gideon
You could use -u or -U :
-u uidlist Select processes whose effective user ID numbers
or login names are given in uidlist.
-U uidlist (XPG4 Only.) Select processes whose real user ID
numbers or login names are given in uidlist.
HTH,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 08:52 PM
02-10-2004 08:52 PM
Re: ps does not show effective uid
hi,
Thanks for quick response.
Actually, I tried that. But it does not show required process if you specify changed effective UID to -u.
bash-2.05b# ps -u rohan |grep test_sw
No output!
I am running the program as root, so
bash-2.05b# ps -u root |grep test_sw
13876 pts/tg 0:00 test_sw_uid
-Rohan
Thanks for quick response.
Actually, I tried that. But it does not show required process if you specify changed effective UID to -u.
bash-2.05b# ps -u rohan |grep test_sw
No output!
I am running the program as root, so
bash-2.05b# ps -u root |grep test_sw
13876 pts/tg 0:00 test_sw_uid
-Rohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 08:52 PM
02-10-2004 08:52 PM
Re: ps does not show effective uid
Rohan,
you use the -f option of ps... man ps:
-f
Show columns user, pid, ppid, cpu, stime, tty, time, and args, in that order.
user
The login name of the effective process owner.
EXTERNAL INFLUENCES
Environment Variables
UNIX95 specifies to use the XPG4 behavior for this command. The changes for XPG4 include support for the entire option set specified above and include the following behavioral changes:
+ The uid or user column displayed by -f or -l will display effective user rather than real user.
So, what you are seeing seems to be the expected behaviour. What happens if you set UNIX95?
Best regards...
Dietmar.
you use the -f option of ps... man ps:
-f
Show columns user, pid, ppid, cpu, stime, tty, time, and args, in that order.
user
The login name of the effective process owner.
EXTERNAL INFLUENCES
Environment Variables
UNIX95 specifies to use the XPG4 behavior for this command. The changes for XPG4 include support for the entire option set specified above and include the following behavioral changes:
+ The uid or user column displayed by -f or -l will display effective user rather than real user.
So, what you are seeing seems to be the expected behaviour. What happens if you set UNIX95?
Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
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 2026 Hewlett Packard Enterprise Development LP