Versions of Solaris up to version 9, “/usr/ucb/ps -aguxwwwww” would give you extremely detailed ps output and not truncate lines. The command was changed due to a vulnerability that was discovered in Solaris 8 and 9, so patches were released for Solaris 8 and 9 to “fix” the problem.
By default, the “/usr/ucb/ps -aguxwwwww” output would look like this:
nobody 15596 5.5 1.09478474272 ? S May 09 1455:55 /bin/sh -c /path/to/some/command/and/it/eventually/gets/truncated
If you set the set UID bit like this:
chmod 4555 /usr/ucb/ps
You can run the same ps command (/usr/ucb/ps -aguxwwwww):
nobody 15596 5.5 1.09478474272 ? S May 09 1455:55 /bin/sh -c /path/to/some/command/and/it/eventually/gets/truncated/but/not/anymore
Simply setting the set UID bit from 0555 to 4555 will allow you to display the full command being executed.