LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   changing roots passwd (https://www.linuxquestions.org/questions/linux-from-scratch-13/changing-roots-passwd-13333/)

dj_relentless 02-01-2002 06:28 PM

changing roots passwd
 
Just wanna make sure I didn't break anything..

I couldn't seem to change roots password,
when I run passwd root it ask for the password then gives the error
passwd: root not found in /etc/passwd

I checked the passwd file and its got

root:x:0:0:root:/root/bin/bash

I added another user fine and could set the password ok..

I tried to delete root and recreate but it gave me
error deleting password entry..

I can't see any error in the line, no missing bits that I can see..

and I thought I'd be a smart ass and try fix it..
umm..so..
I ran pwck and it said there was an error in the line..and I said yes to remove it..
then I added the user root again and it gave all different info for the passwd file..soo..I changed it back to what it was before and now it says there no group 0..
Sooooo..
I checked the group file and it had removed the root entry so I just created it..
then the passwd change thing worked..

I'm just wondering if I broke anything while doing this cause I was just kinda taking educated guesses at it? I'd had to log out and not be able to log back in..

I was also thinking I might of made a small typo at the begining cause I noticed there was not/root/bin/bash file so I changed it to /bin/bash..

lfslinux 02-01-2002 06:58 PM

Re: changing roots passwd
 
Quote:

Originally posted by dj_relentless
I'm just wondering if I broke anything while doing this cause I was just kinda taking educated guesses at it? I'd had to log out and not be able to log back in..
run "id" when logged in as root. If you see this:

root:/home/gerard/lfs# id
uid=0(root) gid=0(root) groups=0(root)


then everything seems be fine at first glance.


All times are GMT -5. The time now is 06:32 AM.