10-25-2019
One of the best (and easiest) ways to recover the root password when you have physical access to the server is to boot from a different disk or partition and then mount the disk or partition with the lost root password file and edit the password file. Normally, just make the password entry blank.
Another way is to boot from a different disk or partition and then mount the disk or partition with the lost root password file and edit the password file and change the userid to "0" of a user whom you know the root password. This will give you root access to that "other user" and you can then change the password of root with that user (since their userid is 0).
Then reboot with the original disk and clean up any changes you made, change passwords, etc.
Always remember, if you have physical access to a computer / disk and loose any passwords, you can mount the disk (where the lost password file resides) and edit it on another computer, assuming of course you have root access on the secondary computer and the disk does not have special access controls in place (most do not).
This User Gave Thanks to Neo For This Post:
10 More Discussions You Might Find Interesting
1. Linux
Dear Forum savants,
I have a problem that I am not sure how to overcome. Two years ago I had
a friend build me computer with a linux os (red hat) for learning purposes. It happens to have an oracle server on it as well... Anyway , because of personal reasons, I lost complete interest in... (5 Replies)
Discussion started by: jxh461
5 Replies
2. HP-UX
i forgot my password on a HP-UX 9.xx machine. is there a possible way of changing it without knowing the root passwd?
I would do it with a boot disk and chroot but I dont have a boot disk available....
any ideas?
thanks!!
Paul Tittel (1 Reply)
Discussion started by: paultittel
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
Is there a way to reset the "root" unix password, pretty much like you would do in linux by going into single user mode? :confused: :confused:
Thank you in advance. (5 Replies)
Discussion started by: Mr Big
5 Replies
4. Solaris
Bit of a strange problem I have never come across before..
I can log into the workstation going through the server as it is a trusted host but when I try and connect to the workstation through SSH or RSH directly it will not take the password, I changed the password when I logged in the machine... (5 Replies)
Discussion started by: Mr Pink
5 Replies
5. Red Hat
hi
i have a RHEL 4 and have forgot root passwd
tried to boot in by singel user and then changing the passwd but it's not letting me do that ......throwing some weird error as .......manipulation
i also tried to make a new user from CLI but even though it's not letting me in from that user as... (12 Replies)
Discussion started by: techbravo
12 Replies
6. Solaris
hello friends,
I am currently using solaris 10.
I have lost the root password.
Can you please give me a step by step procedure on how to set the password again. (11 Replies)
Discussion started by: nsharath
11 Replies
7. Solaris
Hello All,
I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies
8. UNIX for Dummies Questions & Answers
i am a new user of unix .
i lost my SGI unix server root password
Any body please help me,how get password? (2 Replies)
Discussion started by: vasu.k82
2 Replies
9. Web Development
I have VPS openSUSE 12.2
I forgot MYSQL password root
when i run in CMD:
> mysql
Error Message Show :
>> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) (6 Replies)
Discussion started by: CloudniX
6 Replies
10. UNIX for Beginners Questions & Answers
i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet.
and do i have to use the # chgkey -p afterwards?
i need to patch is why i am asking.
thanks (1 Reply)
Discussion started by: goya
1 Replies
LEARN ABOUT OPENSOLARIS
sulogin
sulogin(1M) System Administration Commands sulogin(1M)
NAME
sulogin - access single-user mode
SYNOPSIS
sulogin
DESCRIPTION
The sulogin utility is automatically invoked by init when the system is first started. It prompts the user to type a user name and password
to enter system maintenance mode (single-user mode) or to type EOF (typically CTRL-D) for normal startup (multi-user mode). The user should
never directly invoke sulogin. The user must have the solaris.system.maintenance authorization.
The sulogin utility can prompt the user to enter the root password on a variable number of serial console devices, in addition to the tra-
ditional console device. See consadm(1M) and msglog(7D) for a description of how to configure a serial device to display the single-user
login prompt.
FILES
/etc/default/sulogin
Default value can be set for the following flag:
PASSREQ
Determines if login requires a password. Default is PASSREQ=YES.
/etc/default/login
Default value can be set for the following flag:
SLEEPTIME
If present, sets the number of seconds to wait before login failure is printed to the screen and another login attempt is allowed.
Default is 4 seconds. Minimum is 0 seconds. Maximum is 5 seconds.
Both su(1M) and login(1) are affected by the value of SLEEPTIME.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsr |
+-----------------------------+-----------------------------+
SEE ALSO
auths(1), login(1), consadm(1M), init(1M), su(1M), attributes(5), msglog(7D)
NOTES
By default, the root user has all authorizations.
Granting the solaris.system.maintenance authorization to the Console User Rights Profile may have an undesirable side effect of granting
the currently logged in user maintenance mode access. The solaris.system.maintenance authorization should be directly granted to appropri-
ate users rather than through the Console User Rights Profile.
SunOS 5.11 21 Aug 2008 sulogin(1M)