All of a sudden whenever I try to do anything as root, I get the message 'user root doesnt exist.' The last thing I did was to add users to my users group. Did not mess with root. Now I cant even start yast! Any ideas on how to recover from this? TIA Richard
On Monday 29 December 2003 04:49 pm, Richard Atcheson wrote:
All of a sudden whenever I try to do anything as root, I get the message 'user root doesnt exist.'
The last thing I did was to add users to my users group. Did not mess with root. Now I cant even start yast! Any ideas on how to recover from this? TIA Richard
I looked at /etc/passwd and it had been changed by yast to contain only 4 entries all being of group users. Fortunately the original had been saved so I renamed the backup to passwd and now I seem to have a root user but no password to let me in. My old pw doesnt work now. The question now is How do I get into my machine to change/add the corect password for root?
On Mon, 29 Dec 2003 17:33:37 -0600 Richard Atcheson <ratcheson@earthlink.net> wrote:
The question now is How do I get into my machine to change/add the corect password for root?
(1) Boot with a rescue disk if you got out of Linux. (2) Mount the root partition. (3) Delete the root password in /<mount_point>/etc/shadow (2nd field) and set the new password with passwd. If you just want to keep your old password, you can just cut and paste the root lines in your backups of /<mount_point>/etc/password and /<mount_point>/etc/shadow into the new files (make sure you delete any existing root lines in the new files first). Charles -- "The move was on to 'Free the Lizard'" -- Jim Hamerly and Tom Paquin (Open Sources, 1999 O'Reilly and Associates)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 29 Dec 2003 19:03:28 -0500 Charles Philip Chan <cpchan@sympatico.ca> wrote:
On Mon, 29 Dec 2003 17:33:37 -0600 Richard Atcheson <ratcheson@earthlink.net> wrote:
The question now is How do I get into my machine to change/add the corect password for root?
(1) Boot with a rescue disk if you got out of Linux.
(2) Mount the root partition.
(3) Delete the root password in /<mount_point>/etc/shadow (2nd field) and set the new password with passwd. If you just want to keep your old password, you can just cut and paste the root lines in your backups of /<mount_point>/etc/password and /<mount_point>/etc/shadow into the new files (make sure you delete any existing root lines in the new files first). You don't need to do step 3. Mount the root partition (say /mnt) Then chroot /mnt Now you can just use the password command to fix it.
- -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/8MQ4+wA+1cUGHqkRAlctAJ9ZT8+yCkVYxq7juw/ljbaj1/X6RQCffwjp Sz9DJuoZZoXfokgPTtVrbJ4= =Ixc2 -----END PGP SIGNATURE-----
On Monday 29 December 2003 06:18 pm, Jerry Feldman wrote:
On Mon, 29 Dec 2003 19:03:28 -0500
Charles Philip Chan <cpchan@sympatico.ca> wrote:
On Mon, 29 Dec 2003 17:33:37 -0600
Richard Atcheson <ratcheson@earthlink.net> wrote:
The question now is How do I get into my machine to change/add the corect password for root?
(1) Boot with a rescue disk if you got out of Linux.
(2) Mount the root partition.
(3) Delete the root password in /<mount_point>/etc/shadow (2nd field) and set the new password with passwd. If you just want to keep your old password, you can just cut and paste the root lines in your backups of /<mount_point>/etc/password and /<mount_point>/etc/shadow into the new files (make sure you delete any existing root lines in the new files first).
You don't need to do step 3. Mount the root partition (say /mnt) Then chroot /mnt Now you can just use the password command to fix it.
I was lucky this time! I had a copy of konqi running as root so I could go into /etc and modify things without using the rescue method. However I'm going to save the suggestions cause it will lilkely rear its ugly head again. I'm still concerned as to how this happened. I used yast like I;m supposed to and went to the security section and only added 4 users. When done I clicked finish and continued doing other non-related things. Had I not had the su version of Konqi running I would have had to use the finger magic way as alll of you have suggested. Yes I rely on GUI cause my brain works better that way. But I thank you all for the help. Your advice on password and shadow told me where to look. Just for grins I just went back and added 4 users as I did before and this time it appended the users to both the passwd and shadow files. In both cases yast created a save file of the files being modified. So why wasnt the first instance appended instead of simply replaced??? We may never know! Thanks to all who responded. What a nice bunch of folks! I hope the new year brings nothing but happiness and great new kernels to all. Richard
Richard Atcheson <ratcheson@earthlink.net> writes:
I looked at /etc/passwd and it had been changed by yast to contain only 4 entries all being of group users.
Are you sure you don't blame YaST for something that you have done by mistake?
The question now is How do I get into my machine to change/add the corect password for root?
There are many ways how to do it. I suggest you use the SuSE CD to boot in rescue mode (see the Adminguide). Then mount the root file system, delete the encrypted password in /etc/shadow, reboot, and press enter when prompted for root's password. -- A.M.
participants (4)
-
Alexandr Malusek
-
Charles Philip Chan
-
Jerry Feldman
-
Richard Atcheson