Find the answer to your Linux question:
Results 1 to 3 of 3
My problem is that I cant log in as root, and I cnat change any of the files I need using "su" under the bash. I messed up tryign to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2003
    Posts
    2

    Can't log in as root or change files


    My problem is that I cant log in as root, and I cnat change any of the files I need using "su" under the bash.

    I messed up tryign to install the java compiler (jdk), and when I tried to set the path in the "/root/.bash_profile" I entered it wrong.

    This caused it not to work, so I deleted the fiels, but I forgot to change the line in that file. So now when I try to log in as root, it says that the session lasted less than 10 secs, and so on. It kicks me right out.

    The error states "bash: export: <long line here of bad path> not a valid identifier"

    I can log in as my otehr user, jsut fine.

    The main problem is that when I go into the Shell, an dI su, FEW comands work as root.
    ls -a or dir will not work for example

    I cant get emacs to run under the root, but it works fine as the other user.

    Is there a way that I can "unlock" the /root directories so I can change the file that is causing the problem?? file = "/root/.bash_profile"

    BTW I'm on RH 8.0 if it helps.

    Thx in advance for any help/suggestions.

  2. #2
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    login as a use then su to root. Once you are there type this:
    export PATH=$PATH:/sbin:/usr/sbin:/usr/bin:/bin
    then make your changes.

  3. #3
    Just Joined!
    Join Date
    Jan 2003
    Posts
    2
    Quote Originally Posted by genlee
    login as a use then su to root. Once you are there type this:
    export PATH=$PATH:/sbin:/usr/sbin:/usr/bin:/bin
    then make your changes.
    Thanks a lot for the help, that fixed it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •