I have Solaris-10 server. /usr/ucb/ps auxww is showing full path if I am running it from root. But if I run it from non-root user, its output is truncated. I don't want to use any other alternate command.
Please suggest, what can be its solution.
Terminal is set to term.
I want to use only this command, as some other script is calling this, o do not want to change it.
I am running /usr/ucb/ps auxww
If I save it to file (from non root user), still output is truncated.
I take it you have already done this, that the whole point you are writing is because you are sure the output is different. If that is the case, I guess I'm stumped. Anyone else?
It is working fine on few of other servers with non root user also. I was trying to compare both configurations like .profile and /etc/profile, but couldn't found much on that.
Can it be anything with colums, if I export it with .profile of non root user ?
To get the extended args past the 80 characters available in /proc/[pid]/psinfo, either pargs or /usr/ucb/ps needs to be able to open and read /proc/[pid]/as - the address space of the process.
If you really need this capability for non-root users, you can set the setuid bit on the permissions for /usr/bin/pargs or /usr/ucb/ps:
chmod 4555 /usr/ucb/ps
Doing that will give all users the ability to dump the entire process argument list along with the entire process environment - for all processes. You also need to be really careful with changing permissions on Solaris base OS binaries - the standard Solaris install hard links multiple utilities to the same underlying binary, so if you change the permissions of one you change them all (there are misguided - at best - security recommendations out there that do this and wind up breaking things right and left...)
A better (worse? very hackish...) way might be something like this (off the top of my head, totally untested):
Precisely. I just checked on a Solaris 10 update 2 and /usr/ucb/ps code is shared by 62 binaries, including mdb and dtrace ( man isaexec to understand why). That means you basically grant root access to anyone with adding the setuid bit to ps.
---------- Post updated at 00:12 ---------- Previous update was at 00:07 ----------
I guess pkgchk SUNWscpu will tell you. Can you post this command output ?
I was expecting /usr/ucb/sparc/ps (or /usr/ucb/x86/ps , /usr/ucb/amd64/ps) to be modified, which would have been less unsecured than altering /usr/ucb/ps.
The non root user with which you see the whole argument list might have been granted extra privileges.
Is there a difference between auths and ppriv $$ output on the different servers ?
Yes, application team requires it. One of their script calls this command and use that info for some other script.
Also, this is already working in other servers, so they relunctant to use anything else. Let me check with Oracle also.