Find the answer to your Linux question:
Results 1 to 10 of 10
I'm new to linux, and i've searched the forum and google, but cant find anythng. Basically, i had problems installing Mandrake 10.1 on my laptop, and after 3 hours I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Posts
    15

    Password


    I'm new to linux, and i've searched the forum and google, but cant find anythng. Basically, i had problems installing Mandrake 10.1 on my laptop, and after 3 hours I eventually managed to install it, but the problem i have now is that i cant log in because it asks me for a password. Now, i didnt enter a password i dont think on this install, the last install i did, i entered a password, which i have tried, and it wont accept it. Is there anyway i can resolve this, or is there some kind of default password that mandrake uses?

    Thanks alot

  2. #2
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    You might try it with no password at all (enter) or whatever password you think it is. Passwords are case sensitive. I don't think there is a default password: that's something Windows would do (and has done).

    maybe you can boot with your install CDs and go into "rescue" mode and edit your /etc/passwd file: delete the first "x" in the line that starts with "root":
    Code:
    root:x:0:0:root:/root:/bin/bash
    Then get a command prompt and enter the command 'passwd'. Or you might have to reboot and set the password then. Bottom line is, set your password to something no one will think of, and don't forget it.
    /IMHO
    //got nothin'
    ///this use to look better

  3. #3
    Just Joined!
    Join Date
    Feb 2005
    Posts
    15
    ok, i got into rescue mode and i'm at the console. at the moment i have

    Code:
    [root@rescue /]

    i typed in

    Code:
    /etc/passwd
    and it comes up

    Code:
    bash: /etc/passwd: Permission Denied
    does this mean i'm totally screwed? if it doesnt and eventually i can get in to change it like you say, how do i actually go about editing the file?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2005
    Posts
    22
    From one n00b to another
    >>i typed in

    Sounds like either you need root access, or else perhaps it's interpreting it as you trying to execute the file, which AFAIK you shouldn't have permissions for anyway, since it's a config-file.

    Anyhow, try editing it with vim:
    Code:
    vi /etc/passwd
    -or-
    cd /etc
    vi passwd
    Assuming the file's called 'passwd' and you have access to it, it'll open the file for editing in vim.

    Other than that, I'm afraid I can be of no help.

  6. #5
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Quote Originally Posted by sonic
    i typed in

    Code:
    /etc/passwd
    Entering '/etc/passwd' is like entering '/etc'. '/etc/passwd' is a file name, not a command. You can edit /etc/passwd like I described, but you cannot execute it, which is what you are attempting to do when you enter anything at the command line. To change the password (after you have entered it successfully), enter the command passwd which is actually the same as entering /usr/bin/passwd which is a binary executable (= a command). So do like Hunter2 says (with my more thorough instructions referenced previously) and edit your passwd file (and note that passwd is 2 letters short of the word "password").
    /IMHO
    //got nothin'
    ///this use to look better

  7. #6
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    Ugh guys, if you manage to boot in rescue mode (that's runlevel 1), you can simply type passwd to change the root password. Isn't that easier?
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  8. #7
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Quote Originally Posted by serz
    Ugh guys, if you manage to boot in rescue mode (that's runlevel 1), you can simply type passwd to change the root password. Isn't that easier?
    No it is not the same as runlevel 1, I do believe it's been booted with the installation CD/DVD. Anyhow, do NOT delete the line as suggested before from /etc/passwd file, you should edit the file "/etc/shadow" file and remove the password from that file.

    Code:
    root:$1$SDY48BxKlY3V:12851:0:99999:7:::
    change this line to:
    Code:
    root::12851:0:99999:7:::
    Ok, just to clarify, the text I just removed is encrypted and will be different at your system. The important here is that you remove everything between the two first colons.

  9. #8
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Quote Originally Posted by drakebasher
    and edit your /etc/passwd file: delete the first "x" in the line that starts with "root"
    You are right swemic that you shouldn't delete any lines in /etc/passwd, but only the one character as I said. This works in Fedora Core without requiring a change in shadow: when the 'x' is deleted, you can then log in without a password.
    /IMHO
    //got nothin'
    ///this use to look better

  10. #9
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    Quote Originally Posted by swemic
    No it is not the same as runlevel 1, I do believe it's been booted with the installation CD/DVD.
    Well, I've done that many times and it has always worked for me.

    Linux "single" is runlevel 1, and that's what some distros call it as "Rescue Mode", if it's a CD it will probably use a kernel from there but it will mostly go into runlevel 1. However, you can use the passwd in any usuable runlevel..
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  11. #10
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Yes, I know that single user and runlevel 1 is the very same, but in Mandriva/Mandrake starting your Rescue Mode from installation CD is not the same as start your system in a normal runlevel 1. That was my only point. Since all your partitions will be mounted in /mnt/xxx then the "passwd" command will not have much of affect in rescue mode.

Posting Permissions

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