Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Changing root password
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
martinrandau
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 180
Location: Kristianstad, Sweden

PostPosted: Sun Nov 06, 2005 10:59 pm    Post subject: Changing root password Reply with quote

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. :cry:


martin
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Sun Nov 06, 2005 11:10 pm    Post subject: Re: Changing root password Reply with quote

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
View user's profile Send private message
martinrandau
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 180
Location: Kristianstad, Sweden

PostPosted: Sun Nov 06, 2005 11:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Sun Nov 06, 2005 11:48 pm    Post subject: Reply with quote

If your root partition is /dev/hda3, then use:
Code:
mount /dev/hda3 /mnt/gentoo
Back to top
View user's profile Send private message
Wuotanaan
n00b
n00b


Joined: 06 Nov 2005
Posts: 16
Location: Holland

PostPosted: Sun Nov 06, 2005 11:52 pm    Post subject: Reply with quote

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 :)
_________________
When night falls,
she cloaks the world,
in impenetrable darkness...
Back to top
View user's profile Send private message
devilrick
n00b
n00b


Joined: 21 Feb 2005
Posts: 61
Location: The oh so great South East of England

PostPosted: Mon Nov 07, 2005 12:06 am    Post subject: Reply with quote

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
View user's profile Send private message
martinrandau
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 180
Location: Kristianstad, Sweden

PostPosted: Mon Nov 07, 2005 12:08 am    Post subject: Reply with quote

I know, I'm a complete linux idiot/newbie. 8)

Thank you very much for the help.


martin
Back to top
View user's profile Send private message
elox
n00b
n00b


Joined: 07 May 2005
Posts: 4
Location: Germany - Regensburg

PostPosted: Mon Nov 07, 2005 1:17 am    Post subject: Reply with quote

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
View user's profile Send private message
devilrick
n00b
n00b


Joined: 21 Feb 2005
Posts: 61
Location: The oh so great South East of England

PostPosted: Mon Nov 07, 2005 1:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum