|
|
Help! Having problems with su, sudo...
|
|
|
|
Junior Member
Join Date: Nov 2001
Location: California
Status:
Offline
|
|
While doing some customizing, i made a really dumb mistake. I accidentally chmod some apps in /usr/bin
now when ever i want to su, or sudo, i get the following message.
for su i get:
{akarso}@{localhost}:{/usr/bin}$su
su: setgroups: Operation not permitted
Password:
i then type in my password and then it displays "sorry" and then returns me to the prompt.
for sudo i get:{akarso}@{localhost}:{/usr/bin}$sudo
Sorry, sudo must be setuid root.
then returns me to the prompt.
I tried changing the permissions again, but i can't seem to get the right user/groups to make it work. Here are the current permissions
for su:
{akarso}@{localhost}:{/usr/bin}$ls -l su
-rwxr-xr-x 1 root wheel 14704 Sep 2 19:50 su
for sudo:
{akarso}@{localhost}:{/usr/bin}$ls -l sudo
-rwxr-xr-x 1 root wheel 107608 Sep 2 20:30 sudo
Any help would be really appreciated.
|
(oi)
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Apr 2001
Location: World capital of drugs and prostitution. Hmmm... SEXTC...
Status:
Offline
|
|
I don't know about su, but the sudo 'must be setuid root' is a dead giveaway: you've not got an 's-bit' set for sudo.
So howto:
Log in as root since you can't su or sudo, then
<font face = "courier">cd /usr/bin
chmod 4755 sudo</font>
This will set the permissions of sudo to -rwsr-x-r-x. What the 's' basically means is that your user ID will be set to whoever owns sudo (root) for the duration that sudo runs. It's similar to the permissions of passwd and ping.
As for su, I'm working on a different UNIX at work right now (AIX), and it's su is set -r-sr-x-r-x, which comes down to a
<font face = "courier">chmod 4555 su</font>
Have fun...
[ 12-07-2001: Message edited by: Jelle Monkmater ]
|
The one you love and the one who loves you are never the same person.
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Sep 2000
Location: Adelaide, Australia
Status:
Offline
|
|
Originally posted by Jelle Monkmater:
<STRONG>I don't know about su, but the sudo 'must be setuid root' is a dead giveaway: you've not got an 's-bit' set for sudo.
So howto:
Log in as root since you can't su or sudo, then
<font face = "courier">cd /usr/bin
chmod 4755 sudo</font>
This will set the permissions of sudo to -rwsr-x-r-x. What the 's' basically means is that your user ID will be set to whoever owns sudo (root) for the duration that sudo runs. It's similar to the permissions of passwd and ping.
As for su, I'm working on a different UNIX at work right now (AIX), and it's su is set -r-sr-x-r-x, which comes down to a
<font face = "courier">chmod 4555 su</font>
Have fun...
[ 12-07-2001: Message edited by: Jelle Monkmater ]</STRONG>
On my MacOS X I get
---s--x--x 1 root wheel 107608 Sep 3 13:00 sudo
hope that helps :-)
Michael
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Apr 2001
Location: World capital of drugs and prostitution. Hmmm... SEXTC...
Status:
Offline
|
|
Originally posted by mmurray:
<STRONG>
On my MacOS X I get
---s--x--x 1 root wheel 107608 Sep 3 13:00 sudo
hope that helps :-)
Michael</STRONG>
That would be <font face = "courier">chmod 4111 sudo</font>.
|
The one you love and the one who loves you are never the same person.
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Oct 1999
Location: Brooklyn, NY, USA
Status:
Offline
|
|
I'm actually having a similar problem, but worse. I was re-installing mysql, and removed the mysql user from my system. For whatever reason, it had the effect of mangling su and sudo like above, but now all my system files are set to me as owner, not root.
What's the best way to go about restoring things the way they should be? Is there some script (wishful thinking) to aid this process?
TIA...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|