LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't switch to root (https://www.linuxquestions.org/questions/linux-newbie-8/cant-switch-to-root-281159/)

lemuel 01-23-2005 07:12 AM

can't switch to root
 
hello


I cant seem to switch to root. i typed in "su", typed my password, and this is what came out:

$ su
Password:
setgid: Operation not permitted

I go "sudo passwd" and what came out is this

Sorry, sudo must be setuid root.


anyone here know how to fix this?

jrtayloriv 01-23-2005 07:30 AM

is your user a member of the group wheel?

jrtayloriv

lemuel 01-23-2005 07:35 AM

um no... does that matter?

if so how do i change my group?

jrtayloriv 01-23-2005 07:54 AM

you need to login in as root and run
Code:

gpasswd -a username wheel
where "username" is the name of the user you wish to su from. Log out of root, log back in as regular user and try to su then.

hope this helps,
jrtayloriv

lemuel 01-23-2005 08:13 AM

sorry im kind of a newbie...

when i did that, it said...
unknown group: wheel

bigjohn 01-23-2005 09:25 AM

Quote:

bash-2.05b$ groups
wheel audio games users
bash-2.05b$
That's how I check what groups I'm in for user.

Then there's some links in my sig (try "rute user") or look at this one

Maybe that helps a little ???

regards

John

lemuel 01-23-2005 09:52 AM

how do I change the group of a user?

btmiller 01-23-2005 12:15 PM

Modify /etc/group. Bost most Linux distros don't require you to be in the wheel group to su to root (it's a BSD thing, that can be activated on Linux but usually isn't). Judging by your errors, it looks like your su and sudo binaries don't have the SUID bit set. Can you do "ls -l /bin/su" and "ls -l /usr/bin/sudo"./ The permissions on each should be 4755 (note the leading 4, which enables the SUID bit), owner root, and group root.

lemuel 01-23-2005 05:37 PM

yeey!!! It worked! I'm saved!

thanks btmiller, and all you guys for the effort.


All times are GMT -5. The time now is 11:50 AM.