View previous topic :: View next topic |
Author |
Message |
martinrandau Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/64925478743eca2894bc9a.jpg)
Joined: 10 Aug 2005 Posts: 180 Location: Kristianstad, Sweden
|
Posted: Sun Nov 06, 2005 10:59 pm Post subject: Changing root password |
|
|
I changed my root password to a more complicated one, but sth got wrong and I can't login as root.
How exactly do I do to reset or change the root password?
I know that I need the gentoo live-cd, but what do I do next?
If someone has the energy to tell me in detail, I would be very pleased because I'm not in the mood for learning right now.
martin |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
widan Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/142533236243680bda6f27b.jpg)
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Sun Nov 06, 2005 11:10 pm Post subject: Re: Changing root password |
|
|
martinrandau wrote: | I know that I need the gentoo live-cd, but what do I do next? |
Boot on the LiveCD, mount your root partition to /mnt/gentoo (also /usr if it is separate), then "chroot /mnt/gentoo /bin/bash". Then run "passwd" and set a new password. Exit the chroot, unmount the partition(s), reboot. That should do it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
martinrandau Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/64925478743eca2894bc9a.jpg)
Joined: 10 Aug 2005 Posts: 180 Location: Kristianstad, Sweden
|
Posted: Sun Nov 06, 2005 11:37 pm Post subject: |
|
|
I'm sorry but it doesn't work (or atleast I can't get it to work).
I do this:
1. reboot from live-cd
2. cd /mnt/gentoo (btw, what do you mean by "'/usr' if it is separate"?)
3. chroot /mnt/gentoo /bin/bash
Then I get this:
chroot: cannot run command '/bin/bash': No such file or directory
I can very well imagine that the fault is in step 2, in that I use 'cd' to mount, but I tried 'mount /mnt/gentoo' but it didn't work, and I couldn't find any appropriate command when typing 'help'.
martin |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
widan Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/142533236243680bda6f27b.jpg)
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Sun Nov 06, 2005 11:48 pm Post subject: |
|
|
If your root partition is /dev/hda3, then use:
Code: | mount /dev/hda3 /mnt/gentoo |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Wuotanaan n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 06 Nov 2005 Posts: 16 Location: Holland
|
Posted: Sun Nov 06, 2005 11:52 pm Post subject: |
|
|
martinrandau wrote: | btw, what do you mean by "'/usr' if it is separate"?) |
He meant: "If your /usr-directory is on a different partition, mount it as well.".
martinrandau wrote: | I can very well imagine that the fault is in step 2, in that I use 'cd' to mount, but I tried 'mount /mnt/gentoo' but it didn't work |
Indeed. You need a device to mount. For example: "mount /dev/hda3 /mnt/gentoo", if /dev/hda3 is your root-partition.
martinrandau wrote: | and I couldn't find any appropriate command when typing 'help'. |
Use "man *name of program or command you need help for*" in the future. For example: "man mount".
"*program/command-name* --help" might also give you some help (mostly for use of parameters). For example: "mount --help"
Edit: widan beat me to it ![Smile :)](images/smiles/icon_smile.gif) _________________ When night falls,
she cloaks the world,
in impenetrable darkness... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
devilrick n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/153164878842936d1890577.jpg)
Joined: 21 Feb 2005 Posts: 61 Location: The oh so great South East of England
|
Posted: Mon Nov 07, 2005 12:06 am Post subject: |
|
|
Was just browsing the forum here and saw this. I have never looked at this type of thing before so am I right in thinking, according to what's written here anyone can gain root access to a computer with a livecd? or have I missed something? _________________ Today is good, for I am a part of it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
martinrandau Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/64925478743eca2894bc9a.jpg)
Joined: 10 Aug 2005 Posts: 180 Location: Kristianstad, Sweden
|
Posted: Mon Nov 07, 2005 12:08 am Post subject: |
|
|
I know, I'm a complete linux idiot/newbie.
Thank you very much for the help.
martin |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
elox n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 07 May 2005 Posts: 4 Location: Germany - Regensburg
|
Posted: Mon Nov 07, 2005 1:17 am Post subject: |
|
|
if you have physical access to the computer and you are able to boot from a linux CD - yes anyone can gain root access unless your / or your /etc partition is not crypted. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
devilrick n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/153164878842936d1890577.jpg)
Joined: 21 Feb 2005 Posts: 61 Location: The oh so great South East of England
|
Posted: Mon Nov 07, 2005 1:39 pm Post subject: |
|
|
I was not aware of that, something to bear in mind for future installations. _________________ Today is good, for I am a part of it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|