1837173 Members
2680 Online
110113 Solutions
New Discussion

root

 
SOLVED
Go to solution
navin
Super Advisor

root

Hi ,
At situation when i forget the root passwd , i used to TC at VFP and interrupt the boot process to login to single user monde , from there i change the root passwd.
Is there any way with out reseting OS , can we change root passwd at VFP.

Thanks
Learning ...
7 REPLIES 7
Pete Randall
Outstanding Contributor
Solution

Re: root

No, in order to change the password, you have to be logged in. When you come up in single user mode, you are automatically logged in without having to enter a password. The VFP has no faciliity to accomplish this.


Pete

Pete
navin
Super Advisor

Re: root

Ok Thank You
Learning ...
Patrick Wallek
Honored Contributor

Re: root

This is also why you should have some facility to do this without rebooting the machine.

sudo is a good tool for this.

http://www.courtesan.com/sudo/
A. Clay Stephenson
Acclaimed Contributor

Re: root

Of course, a better idea than sudo is to never forget root passwords. In over 25 years in UNIX I have never forgotten a root password. If you will adopt a password creation convention (e.g terms related to Chess, names / lines from your favorite cartoons, parts of sailing vessels, ... and adopt your own intentional misspelling rules and punctuation rules for these terms) then there is really no excuse for forgetting a password -- root or otherwise. Using this system, I can rattle off password from machines that I haven't used (and probably no longer exist) in years.
If it ain't broke, I can fix that.

Re: root

... and for those without Clay's eidetic memory there's the old favourite... write the password down!

Now before everyone screams at me, it can still be physically secured (most companies have a firesafe somewhere on site). I even worked with one company where the passwords were split in 2 (yes each admin typed in his half when they were set) and the 2 components were stored in different safes requiring different managers to access (this was a site where no-one did anything as root during normal operation)

HTH

Duncan

I am an HPE Employee
Accept or Kudo
UVK
Trusted Contributor

Re: root

Hi Navin.

You can change the password if you are already logged in as root, if you are not a root user and still want to do it, do something to gain write access to /etc/passwd file :) and remove the characters in the 2nd field of the root line.

Cheers
-------------------------------------------
Like it or worked !! Click kudos !!
Patrick Wallek
Honored Contributor

Re: root

Vijay -- That is fine as long as your system is not trusted. However, if your system is trusted, or even if you are using /etc/shadow, then just modifying /etc/passwd will not work.

Besides, one should NOT be able to "gain write access to /etc/passwd" since that should only be writeable by root! Anything else is a major security hole.