LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Set root password unexpired (https://www.linuxquestions.org/questions/linux-newbie-8/set-root-password-unexpired-391754/)

dwarf007 12-11-2005 10:17 PM

Set root password unexpired
 
Hi all,

I am facing a problem on the expiration on root account login. Can we actually set unexpired password to root account?

Anyone knows please help

Thank You.....

btmiller 12-11-2005 11:18 PM

Look at the -x option to passwd which specifies how many days before the password expires. You xcan set this to some huge value like 99999.

dwarf007 12-12-2005 01:22 AM

Can we do this in the Init 5 level? Do we need to open the file /etc/passwd and look for row which have root?

Thank You.....

btmiller 12-12-2005 01:33 AM

No, just open up a terminal (as root) and do "passwd -x 99999 root". That should work, AFAIK.

RaelOM 12-12-2005 01:49 PM

You can also edit the /etc/shadow file directly (Not the best idea) and remove the expiration information at the end of the string.

usually like:

<user>:<hash>:13118:0:90:14:::

Just remove the 0, 90 and 14 and the account will be non-expiring.


All times are GMT -5. The time now is 12:26 PM.