Recent versions of Solaris come with a suite of tools known as the “/proc” tools, which list and/or modify process information in the kernel-maintained /proc filesystem. One of these tools, pcred, can be used to change (among other things) the UID of a running process, e.g.:
|
1 2 3 4 5 6 7 |
# ps -ef | grep sleep root 25853 22210 0 09:55:53 pts/10 0:00 grep sleep kevin 24088 24081 0 09:50:53 pts/11 0:00 sleep 10000000 # pcred -u 123 24088 # ps -ef | grep sleep mrbig 24088 24081 0 09:50:53 pts/11 0:00 sleep 10000000 root 25911 22210 0 09:56:02 pts/10 0:00 grep sleep |
If you run a
man proc, you’ll receive the manual page for the /proc tools - highly useful.