Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-04-2007, 05:14 PM   #1
LQ Newbie
Registered: Feb 2007
Posts: 8

Rep: Reputation: 0
reset password

is it possible to reset the root password on a *nix box? I think we may have a sun something or other.

we need to change the ip address of it.
Old 09-04-2007, 05:20 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,896

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Old 09-04-2007, 06:54 PM   #3
LQ Newbie
Registered: Feb 2007
Posts: 8

Original Poster
Rep: Reputation: 0
awesome thanks
Old 09-04-2007, 07:03 PM   #4
LQ Newbie
Registered: Sep 2007
Posts: 4

Rep: Reputation: 0
if you have an open root session or can somehow gain root privileges, perhaps through ssh, then you can use the program "passwd" to change the root password..
type "passwd --help" in your terminal to see how you can use your specific passwd program.
If you know all this and the problem is that you don't have root access.. sorry, can't help you.
Old 09-05-2007, 04:33 AM   #5
Registered: Oct 2006
Distribution: Debian, Ubuntu, Centos
Posts: 36

Rep: Reputation: 17
Smile If you are sitting on that machine

If the machine is local then you just need to boot it into single user mode but some distributions like suse won't allow to apply this method as they require password in single user mode as well.

Single user mode
Power on the system and when grub screen comes press escape and then use arrow keys and on the relevant OS title, press e then in "kernel" line put "s" or "single" (without quotes), press enter and then press b.

Well I am not so good in writing.. So thanks for bearing with me.. If this doesn't work just let me know.
Old 09-05-2007, 05:12 AM   #6
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Or you can boot the machine off a live-cd Linux that can read the partition type of the machine, mount the partition on which the shadow file is on (provided that you are using a system that does use shadow, should nowadays) which is usually root partition, and then just erase the encrypted password field. This should result in not having a password for root at all (simply pressing ENTER at password prompt after a normal reboot should do). However it's more convenient if you can obtain a root login and use passwd instead like described above. There are several ways to obtain a root login if the system is not well secured (and maybe even then), booting to a single-user mode being the easiest of them.


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
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 05:11 AM
reset root password kapslock Debian 14 07-27-2006 08:08 AM
Password reset hongman Linux - Newbie 2 07-11-2005 06:46 AM
Password won't reset with Mdk 10.1 linubex Mandriva 22 06-24-2005 07:44 AM
reset the password ust Linux - General 1 02-11-2004 07:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:56 AM.

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