Link to home
Start Free TrialLog in
Avatar of dantesp
dantesp

asked on

cannot login as root

I used root to configure my system for networking (linuxconf). I remember I saw a usid/usgroup called "operator operator root". I thought it could be a potential security hole so I unchecked it to disable it. Now, when I tried log in again, the system would not recognize root. I have another usid "dsp". I used it. Through the console icon, "su root". Closed the console. Now, the panel would not respond at all, whatever I do. I keep rebooting, (Dell computer's) F2=set up, F10=utility were no help. Using "root" and even "dsp" were not recognized.
How can I recover my root account?
Obe One Kenobi, you are my only help. Pls. help me.
Avatar of rwenzla
rwenzla

Are you using Lilo?

Enter 'linux 1', to drop you into single-user/maintenance mode.

The root file system will be mounted read-only, so you'll
have to do a

mount -w -o remount /

before you can edit the file to restore root.
BTW Obi Wan's a friend of mine.
Avatar of dantesp

ASKER

Yes, I'm using Lilo. I can interrupt Lilo while loading (shift-tab). I can enter "linux l" but then it just continues to boot till it presents the GNOME login gui. On this screen, I cannot login as "root", "dsp" or "admin".  Anything else is error. I'm stuck. I did the "makebootdisk" very early before. How will this help? Is there something else that will work?
Thanks.
rwenzla did tell you to enter "linux l" (where you typed the lower case "L"), but "linux 1" (where "1" is the number: ONE)

this runs you into runlevel 1, which usualy is maintenance mode without password question and so on....

if this doesn't help you out, get the installation/rescue disk ready, boot up with it, mount your harddrive and correct your "passwd" file manualy (it's located in the /etc directory of your hd)
Avatar of dantesp

ASKER

I was able to enter "linux 1" and luckily got the "bash# " prompt. Am I already using the root account? Assuming I am, command "bash# mount -w -o remount /", "bash# passwd", answered with <mypassword>. Reboot the machine. Redhat GNOME login screen allows me to login as "root", accepts password, but then screen blanks out, comes back to login screen. Tried "dsp" "password", screen blanks out, comes back to login screen,.. again and again and again.
What will I do? (Is this song by Gershwin? Only asking..)
ASKER CERTIFIED SOLUTION
Avatar of rwenzla
rwenzla

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
in /etc there is a file called securetty.

have you added your tty's in there so u can loging as root from a client ?
the file which configures /etc/securetty and so on is called /etc/login.defs

if you experience further problems have a look at it.
I poked around in linuxconf.  It does run from text mode.
It looks like you deleted the user "operator".  Operator is probably used to set up some of the X stuff.

Recreate it on my system operator has a UID of 11.  The entry you deleted should read

operator   operator  11  root


I don't think itts the securetty file, since you're havint this trouble locally.  If you were geting logged out from a telnet session, maybe this might be the cause.
Hope it helps.
Avatar of dantesp

ASKER

Thank you everybody: rwenzla, gunny, jliakos, and all the supporting cast.
A bit of history:
When I got in as "linux 1", I noticed that I can "su root". So I tried configuring all with passwd, group and all "root", "dsp", "admin". I even deleted "operator" (userdel ...) and add it back (adduser operator operator 11 root).
I'm beginning to sense that Xwindows is the one misbehaving because in the login gui screen of X, it accepts "root" and its password ("dsp" and its password) and just to test it entered a wrong account and it responded that there was no such account.  That means, things are OK (I think) except that X is in a never ending loop of login. (Is this correct? I don't know.) So I'm thinking how to login as console mode (not the gui X mode) and what scripts/files do I have to fix just to stop X from that continuous loop.
Or is there an easier way.
I'll try doing all your suggestions again (and again) and I'll post the results.
In case I don't post the result(s), I have numbered the front and back of my T-shirt 102.  This is (I believe) the next number of a fatal jumper from the Golden Gate Bridge. "I will leave not only my heart in San Francisco, but everything.  And my computers, books, bank account, house, a sailboat, a plane, a year-round train ticket (Caltrain -- San Francisco/San Jose) and all, I will leave to all of you guys."
"linux 3" at LILO: to use text mode.

run level 0 = shutdown
run level 1 = maint. mode
run level 2 = Not sure, I've never used it.
run level 3 = text mode
run level 4 = This one is unused in RedHat.
run level 5 = Xdm
run level 6 = reboot.

you can uses these either with LILO or the init command.
This sounds strangely like my /dev/null problem, except with me Only root could login.  This was a protection problem.

Could you have inadvertantly deleted the device file /dev/nul ?

to recreate it cd to /dev and do a

mknode null c 1 3

Avatar of dantesp

ASKER

Latest news:
"linux 3" is really nice. I was able to get around.

mknod null c 1 3        ; file exists

/etc/passwd revealed through emacs that "root" account wasn't there, so I edited "root::0:0:root:/root:/bin/bash"
"su root"
"passwd"   -->set the password

"operator::11:0:operator:/root:/bin/bash"  -->set up (password none)

checked the group ids
set run level to text/network

activate/changes
logout
shutdown
reboot

First incident:
Text mode came in.
Logged in as "root". OK
"startx" --> it runs. The screen was the normal X screen I was using before the anomaly. Continued with my usual network configuration (linuxconf). Save, logout, shutdown.

Second incident:
Logged in. Change the configuration mode to X login. Logout.

Login. X screen showed. "root". The login screen blanks out momentarily, comes back to login. (It does this continuously.)
Shutdown.

Reboot. Interrupted with "linux 3". Login "root". "startx".
Bingo. All the hordes of error messages came out "...Mach64... blah..blah...blah.."
"/bin/bash/.Xauthority... blah...blah...blah"


In short, I'm tired.
What I'm thinking is that it all started with a simple "unchecking/disabling the account operator" and it spawned unruly effects.  Since the configuration(s) I did with the networking files are still fresh in my mind and there are no users here but me, I can recreate the configuration with the cool feeling that there is no ghost in the machine to worry about in the future.  In short(est), I want to completely reinstall the Linux OS as it arrived fresh from the factory.

Would you please tell me how? (I'm new in Linux.) I have all the original CDs that came with this server.

Thank you so very much guys.

The golden rule: DO NOT UNCHECK THE OPERATOR ACCOUNT.  IT IS DANGEROUS TO YOUR HEALTH.
Amen.

 

Avatar of dantesp

ASKER

I gave away my T-shirt to the next guy in line.
To reinstal, just put in the bootdisk and cd and re-boot.

If you don't have a linux install boot disk, any'ol dos/windows boot disk with CD drivers will do.

Boot to dos, switch to your CDROM drive (D:?), cd DOSUTILS,
run AUTOBOOT.
Avatar of dantesp

ASKER

Thank you friend of Obi Wan, I will tell all the nomads surviving citizens of planet Olderon to remember you.

  ...and that it's so good a feeling that "I am not alone"...