parsed.org

Tips by tag: root

Copying a filesystem by http://xinu.myopenid.com/ on Jan 12, 2005 10:59 AM

Here is a way to copy an entire filesystem without descending down its subsumed mount points. This example uses the root filesystem:

$ find / -xdev | cpio -pm /desired/location
commandscopycpiofilesystemfindrootshell
Find the Hog by http://xinu.myopenid.com/ on Sep 10, 2005 12:00 AM

If you need to find the process hogging your CPU, try this:

$ ps aux | awk '!/root|nobody/ { if ($4>2) {print $2}}'
awkcpuownerpipeprocessrootshelluser

Reset the root password:

1. Insert the Solaris install CD.
2. Issue STOP-A (Ctrl-Break).
3. Type: boot cdrom -s
4. fsck /dev/rdsk/c0t0d0s0
5. mnt /dev/dsk/c0t0d0s0 /a
6. cd /a/etc
7. TERM="vt100"; export TERM
8. vi shadow
9. on root line, delete everything in the second ":" delimited field.
10. exit out of file (ESC :wq! -or ESC ZZ)
bootcommandsconfigurationhackpasswordresetrootsolarisstartup
Set Background Color by http://xinu.myopenid.com/ on Dec 31, 2005 04:13 PM

You can change your X background color with this command:

$ xsetroot -solid steelblue &

The setting is not persistent; the command should go in ~/.xinitrc or ~/.Xsession, depending on how you start X, so it will get run each time X starts. The color definitions are in the rgb.txt included with your X distribution.

backgroundrootstartupx11xsessionxsetroot
RSS