On Fri, Feb 01, 2002 at 06:49:17PM +0530, Praveen Kannan wrote: > On Fri, 2002-02-01 at 13:09, [EMAIL PROTECTED] wrote: > > Hmm... :) Well what if somebody tries to meddle with /etc/passwd > > and decided to remove it (with root access, of course). He/ She > > can be even an hacker. Imagine if the root user doesn't exist, > > there is no way of even rebooting the system, performing "root" > > stuff etc. Also a similar case of an "inactive" root would be > > setting a password ageing for root (using chage). So effectively > > a root user can "expire" after some time. > > > > Very very trivial. As u know when u boot into single mode, your > filesystem is read-only.(Mandrake behaves diffrently). First boot > into single user mode and at the prompt : > > # mount / -o remount,rw > > This will remount the "root" as read-write. So now u can go into > /etc/passwd and add the deleted entry like > > root:x:0:0::/root:/bin/bash > > Save the file and reboot. That's it !! U can use chage to "renew" > yr expired root account, if that's yr problem > > Hope this helps..Any guys interested in making a LOST of it ?? > ---end quoted text---
For a deleted/ altered/ damaged /etc/passwd, the above process would get root on line ... But other important thigs like bin, daemon, adm, lp, sync, shutdown etc which have uid:gid below 100 are also needed. In addition you have to restore all your users as well ... For that, a backup copy of /etc/passwd would be needed. Some installations have a /etc/passwd- file, which would help ... Just my 2p Bish -- : ####[ Linux One Stanza Tip (LOST) ]########################### Sub : Changing keyboard repeat rate LOST #134 Is your keyboard so fast that you get repeat characters like thhiiissss ? You can slow it down ... Try : `kbdrate -r 3.0` This permits 3 keystrokes per second. 'man kbdrate' for more. ####<[EMAIL PROTECTED]>#################################### : _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
