Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: su setgid: Operation not permitted

Posted on 2006-12-13 16:14:31 by hari

Hi all,

As I wanted to give 0777 permission for /home/test directory, I want to

execute "chmod -R 0777 /home/test", but I mistakenly executed "chmod -R

0777 /". Due to this entire file system permission got changed to 0777.



Now I am not able to execute su, which gives me error as "setgid:
Operation not permitted". It seems to be I have created a serious
problem. Can anyone please help me to solve this problem?

Report this message

#2: Re: su setgid: Operation not permitted

Posted on 2006-12-13 16:59:18 by Casper.Dik

"Hari" <p.r.hariram@gmail.com> writes:

>Hi all,

>As I wanted to give 0777 permission for /home/test directory, I want to

>execute "chmod -R 0777 /home/test", but I mistakenly executed "chmod -R

>0777 /". Due to this entire file system permission got changed to 0777.

>Now I am not able to execute su, which gives me error as "setgid:
>Operation not permitted". It seems to be I have created a serious
>problem. Can anyone please help me to solve this problem?

Can you still login as root?

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Report this message

#3: Re: su setgid: Operation not permitted

Posted on 2006-12-13 17:16:56 by hari

No, Now I am not able to login as root. I have logged in as a different
user.

Casper H.S. Dik wrote:
> "Hari" <p.r.hariram@gmail.com> writes:
>
> >Hi all,
>
> >As I wanted to give 0777 permission for /home/test directory, I want to
>
> >execute "chmod -R 0777 /home/test", but I mistakenly executed "chmod -R
>
> >0777 /". Due to this entire file system permission got changed to 0777.
>
> >Now I am not able to execute su, which gives me error as "setgid:
> >Operation not permitted". It seems to be I have created a serious
> >problem. Can anyone please help me to solve this problem?
>
> Can you still login as root?
>
> Casper
> --
> Expressed in this posting are my opinions. They are in no way related
> to opinions held by my employer, Sun Microsystems.
> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.

Report this message

#4: Re: su setgid: Operation not permitted

Posted on 2006-12-13 17:49:09 by daddy.says

Hari wrote:
> No, Now I am not able to login as root. I have logged in as a different
> user.

I'd suggest first of all that rebooting will make things a whole lot
worse.

Your first job is to get root so that you can fix up the permissions.
Since you've changed all the permissions none of the setuid(0) binaries
such as sudo will help you.

However you *might* be able to get lucky and use your normal user to
edit the root crontab file, or a system cronjob - since you've changed
the permissions to 777.

Perhaps add a shell script into /etc/cron.d, /etc/cron.hourly, or
/var/spool/cron/crontabs.

make a script "/tmp/get-root" and add:

#!/bin/sh
cp /bin/sh /tmp/sh
chmod 4755 /tmp/sh
chown root:root /tmp/sh

Then get your cron daemon to execute that. Once it works, if it does,
you can use /tmp/sh to fixup the rest of the system / restore from a
backup

Steve

Report this message

#5: Re: su setgid: Operation not permitted

Posted on 2006-12-13 18:08:55 by Casper.Dik

"Hari" <p.r.hariram@gmail.com> writes:

>No, Now I am not able to login as root. I have logged in as a different
>user.

It might not be possible to "su" because you probably removed the set-uid
bit from all executables.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Report this message

#6: Re: su setgid: Operation not permitted

Posted on 2006-12-13 18:09:35 by Casper.Dik

"Hari" <p.r.hariram@gmail.com> writes:

>No, Now I am not able to login as root. I have logged in as a different
>user.


But if everything is mode 777,, you cann likely remove any obstacles to
being able to login directly as root using your editor of choice.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Report this message

#7: Re: su setgid: Operation not permitted

Posted on 2006-12-13 18:54:38 by daddy.says

> But if everything is mode 777,, you cann likely remove any obstacles to
> being able to login directly as root using your editor of choice.

It depends, as things like /bin/login will have lost their setuid bit
so a root login would probably fail ..

Interesting problem to get into, I'm tempted to try it out for real
on a VMWare installation.

I guess the obvious attacks are against daemons that would still be
running from before the permission change. Since they'll still have
any setuid/setgid privileges.

Steve

Report this message