Where is the root password located?
Hello everybody,
do you know in what file the root password is stored? So that if i am doing a image copy can replace that file... Thanks Tobias |
Passwords are typically encrypted and stored in /etc/shadow.
If I were making images for installing, I would first DISABLE the root password. Then, in the new install, the first user will simply enter "passwd root" to make a new one. (When first logging in as root, the system will not ask for a password) To disable the root password, edit the /etc/passwd file and remove the "x" in this line: root:x:<snip> so it looks like this: root::<snip> |
Thanks for the help. Is it possible to copy /etc/shadow from one linux to another?
|
Quote:
Advisable--probably not Look at the contents of the file and ask yourself if all the listed users are going that have all the same parameters in a different system. If you are imaging the SAME install to another box with the same hardware, then it should work fine. |
Hi,
/etc/shadow is made automatically, and there is a copy of its default with name /etc/shadow- , shadow file is updated automatically when you create, modify a user so there will be difference in two seprate machines /etc/shadow files. btw, it is possible to take it from one machine to another, but it will cause problem if /etc/passwd and /etc/shadow has difference. thanks |
All times are GMT -5. The time now is 05:19 PM. |