Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving knoppix root passowrd

Status
Not open for further replies.

zed994

Technical User
Sep 11, 2003
71
AU
after saving knoppix root password from the root shell useing passwd root, is it possible to save it??

Thanks

Alex
 
I've never tried. I just use sudo from the knoppix account. It is set for root permissions with no password requirement.


pansophic
 
whats sudo, how do i configure and use it, thanks.. alex
 
sudo allows you to run a single command as another user. By default, that other user is root.

sudo /sbin/ifconfig

will run ifconfig as root.

Do a man sudo for all of the options.


pansophic
 
A simple pair of shell scripts will do it; all you need to do is copy /etc/passwd to some removable media.

Script 1: Save
Code:
if [ -f /mnt/floppy/etc ]
  cp /etc/passwd /mnt/floppy /etc
else
  mkdir /mnt/floppy/etc/
  cp /etc/passwd /mnt/floppy/etc
fi
--------------------------------------------------------------
Script 2: Load
Code:
cp /mnt/floppy/* /
--------------------------------------------------------------

You can add more files to back up by modifying the first script to include them. /home is a good thing to back up (An alternative to persistent home, which I haven't gotten to work), as is /root, /ramdisk (Note: if you do that, make sure that you have massive storage space; that's the entire ramdisk!]

--Dan Hirsch
CEO of DanSoft
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top