[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Can't su to root
- Subject: Re: [cobalt-users] Can't su to root
- From: "Neil J. Kemp" <cobalt@xxxxxxxxxx>
- Date: Thu Feb 10 10:53:33 2000
I have no idea if it'll work, but it's worth a try. Telnet in AS the user
that now owns /etc (and more importantly /etc/passwd)
edit /etc/passwd (pico will do it) and find the user that owns
/etc. You'll have a line like:
username:x:112:23:Real Name:/home/sites/site13/users/username:/bin/bash
The first number (112) is the user id, the second (23) is the group
id. Write down the user id and then change it to 0 (super user aka
root) also change the group id.
so the line now looks like:
username:x:0:0:Real Name:/home/sites/site13/users/username:/bin/bash
save the file. relog back in again and you should (theoretically) find
this user now has root privaledges! (user id 0!) and can chown the
directory back to root etc. when u're finished (and tested that it
works!) re-edit /etc/passwd and change the 0:0 back to the numbers u had
before.
I can't guarentee it'll work, but it can't make things worse! (unless your
user discovers he has root before u change him back..)
oh and incidently if he doesn't have telnet access u'll need to start
panicing ;-(
--Neil
On Thu, 10 Feb 2000, John P. Cuprisin wrote:
>
> I was adjusting permissions for a site on my RaQ3 while logged in as
> root. I got careless with a wild card and inadvertently changed the
> entire /etc directory and /root directory to the user/group for the
> site I was working on. Now I am in trouble and can not su to root. I
> get the error:
> "su: cannot set groups: Operation not permitted" . I have reset the
> user/group to admin and I can chown anything higher than admin. I
> can't chown anything to root. Any ideas how I can recover to at least
> being able to function as root to clean up the mess I made.
>
> John
> JCSolutions
>
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>