LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2008, 08:24 AM   #1
shrikant7017
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
Smile can not login as root


hi everybody,
i m new to linux world , i have installed linux ES-4.
i have installed netbeans ,jdk 1.6.0_04 .
while registering java plugins i gave command as qouted "rm -fr $HOME/.netscape/java" .
after doing this root login failed.when i login in with root account .
but using anothe login ,for example ,admin it works.
what is the problem ?
can any one find out solution for this?
thank u
 
Old 03-06-2008, 10:58 AM   #2
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,118

Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
I suspect you have erased the /root directory. To verify, as any user, do a 'cd /' and then do a 'ls -l' and see if you still have the root directory.

I'm not sure how to recreate it, if it is gone. Possibly someone else can chime in and help out. Post back what you find.
 
Old 03-06-2008, 02:41 PM   #3
ararus
Member
 
Registered: Mar 2008
Location: UK
Distribution: Slackware
Posts: 56

Rep: Reputation: 15
Standard incantation when you screw something up and can't log in as root (this assumes you are "local" and have physical access to the machine, of course, if it's a remote system, you'll need someone on hand to do it for you):

Reboot, at the lilo/grub boot screen, append 'init=/bin/sh' to the command line. This will boot you straight into a shell (at this point, you are, by definition, root, since the shell is running as init (process 1)). Then, remount / read-write:

Code:
mount -o remount,rw /
Fix whatever it is you screwed up (details vary... ).

Now, remount ro:

Code:
mount -o remount,ro /
Finally, exec init to continue booting normally:

Code:
exec /sbin/init
(No need to reboot.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 05:27 PM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 09:28 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 04:44 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 12:39 PM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-06-2004 12:40 AM


All times are GMT -5. The time now is 02:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration