ps output truncated


 
Thread Tools Search this Thread
Operating Systems Solaris ps output truncated
# 8  
Old 03-21-2013
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 ?
# 9  
Old 03-21-2013
Maybe try md5sum /usr/ucb/ps on each server and see if any differences in executable.

Maybe just accept the security behavior and figure out how to deal with it. What's the problem with the output being truncated?

Did it previously work? If so, what might have changed?
# 10  
Old 03-21-2013
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:
Code:
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):
Code:
cp -p /usr/ucb/ps /usr/ucb/ps_priv
chgrp sysadmin /usr/ucb/ps_priv
chmod 4550 /usr/ucb/ps_priv

That would only allow users who are members of the sysadmin group to run the command.
# 11  
Old 03-21-2013
Quote:
Originally Posted by solaris_1977
It is working fine on few of other servers with non root user also.
They might be running an older release of Solaris with which there wasn't yet this enforcement.
Have a look to /etc/release
Quote:
Can it be anything with colums, if I export it with .profile of non root user ?
As I wrote, it is the expected behavior. Nothing you can change without raising your privileges as I already suggested.
# 12  
Old 03-21-2013
Permissions and ownership is exactly same in a working and non working server for /usr/ucb/ps.
Working server is update-5 and non-working is update-8
# 13  
Old 03-21-2013
Solaris 10 ps(1b) manual page states:
Note: The wide output option can be viewed only by a superuser or the user who owns the process.

So if it works with update 5 and its manual page has the same statement, that is a bug here, not the other way around.
# 14  
Old 03-21-2013
I read it, but still trying to understand what setting is there in other similar servers, where this is working (without sudo)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ps -ef, output getting truncated, please help

Hi All, here is an output of my command and the problem is that my output string is truncated, I want to exact the full string, I am on BASH shell, please help me out. Regards Rahul command with Output : lonss05903:cmdsvc01 /home/cmdsvc01 > ps -aef|grep 'Copy' cmdsvc01 2642 8675 ... (7 Replies)
Discussion started by: rahulkalra9
7 Replies

2. UNIX for Advanced & Expert Users

Problem piping find output to awk, 1st line filename is truncated, other lines are fine.

Today I needed to take a look through a load of large backup files, so I wrote the following line to find them, order them by size, and print the file sizes in GB along with the filename. What happened was odd, the output was all as expected except for the first output line which had the filename... (4 Replies)
Discussion started by: gencon
4 Replies

3. UNIX for Dummies Questions & Answers

output from sed getting truncated

Hi all, I have used sed command with a file of size 7KB and stored the output to another file. When i look into the output file, a few file lines at the bottom have got truncated. The sed statement i used is as below. Why does this happen and how to resolve this. SQL=`sed... (3 Replies)
Discussion started by: madhan@29
3 Replies

4. Linux

relocation truncated to fit

Hi, I am getting linking error i.e. /ade/aime_urtk/oracle/has/include/caa_ResStateListener.hxx:79: relocation truncated to fit: R_PPC_GO T16 vtable for CAA::ResourceStateListener /ade/aime_urtk/oracle/has/lib//libcaad.a(caa_Main.o)(.text+0x88e6): In function `CAA::ResourceStateL... (0 Replies)
Discussion started by: jgobbur
0 Replies

5. UNIX for Dummies Questions & Answers

File gets truncated

Hi Guys, I have a master script file. That calls the other script files. The sub script files append some of the data to the log file. Once the master script completes one sub script execution and returns to execute other sub script that appends to the same log file. the log file gets... (2 Replies)
Discussion started by: Swapna173
2 Replies

6. Shell Programming and Scripting

Truncated with a pipe?

OK, I'm stumped. I have a shell script that reads a list, and for every item in the list performs a lookup in our Active Directory. Now, it seems that when I pipe the results into grep, the complete results are not there (truncated?). I'm not sure if this is a limit of the pipe, grep, shell... (1 Reply)
Discussion started by: TheCrunge
1 Replies

7. AIX

PS truncated in AIX

folks; how can i get longer output than the one i got by using "/usr/ucb/ps awwx"? :mad: (2 Replies)
Discussion started by: moe2266
2 Replies

8. Solaris

ps truncated output

Hi Problem of ps on Solaris 8 and 9 Perhaps a silly question but I can't find a solution. the output of the command ps -ef is truncated. I've tried to change the terminal settings with stty putting a big number of colums: no change. Following the man page of ps i have set the variable... (8 Replies)
Discussion started by: renoc
8 Replies

9. UNIX for Advanced & Expert Users

ps output truncated

Hi! I have some shell scripts receiving in input lots of parameters and I need to select the ones having a particular value in one parameter. A typical shell command line is: PROMPT > shell_name.ksh -avalue_a -bvalue_b -cvalue_c -dvalue_d ... I used a combinaton of ps and grep commands... (5 Replies)
Discussion started by: pciatto
5 Replies

10. Shell Programming and Scripting

ps output truncated

Hi! I have some shell scripts receiving in input lots of parameters and I need to select the ones having a particular value in one parameter. A typical shell command line is: PROMPT > shell_name.ksh -avalue_a -bvalue_b -cvalue_c -dvalue_d ... I used a combinaton of ps and grep commands... (1 Reply)
Discussion started by: pciatto
1 Replies
Login or Register to Ask a Question