LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   reset password (https://www.linuxquestions.org/questions/linux-newbie-8/reset-password-582200/)

duki 09-04-2007 04:14 PM

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.

bigrigdriver 09-04-2007 04:20 PM

http://aplawrence.com/Linux/lostlinuxpassword.html

duki 09-04-2007 05:54 PM

awesome thanks

BigMomma 09-04-2007 06:03 PM

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.

rishipandit007 09-05-2007 03:33 AM

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.

b0uncer 09-05-2007 04:12 AM

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.


All times are GMT -5. The time now is 08:38 PM.