Unix Technical Forum

SUID problem

This is a discussion on SUID problem within the Debian Linux support forums, part of the Debian Linux category; --> Hi, I'm having a problem on Debian Woody: I cannot seem to be able to correctly use the SUID ...


Go Back   Unix Technical Forum > Unix Operating Systems > Debian Linux > Debian Linux support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-19-2008, 07:31 AM
Marco De Vitis
 
Posts: n/a
Default SUID problem

Hi, I'm having a problem on Debian Woody: I cannot seem to be able to
correctly use the SUID attribute.

Let's suppose I'm in /root and have a simple "test" script, for which the
SUID attribute is set:

localhost:~# pwd
/root

localhost:~# ll ./test
-rwsr-xr-x 1 root root 29 ott 13 16:48 ./test

localhost:~# cat ./test
#! /bin/bash
touch ./test_ok


It works fine when I launch it as root, but not when launching it as a
different user:

localhost:~# ./test

localhost:~# ll ./test*
-rwsr-xr-x 1 root root 29 ott 13 16:48 ./test
-rw-r--r-- 1 root root 0 ott 13 16:54 ./test_ok

localhost:~# rm ./test_ok
rm: remove `./test_ok'? y

localhost:~# su goofy

localhost:/root$ ./test
touch: creating `./test_ok': Permission denied


It worked fine on Mandrakelinux, and this makes me suppose I'm just
missing something very stupid... but what?
Does it have anything to do with sudoers? I don't think so, /etc/sudoers
is the same as the one on Mandrakelinux...

Thanks in advance.

--
Ciao,
Marco.

...."You Had It Coming", Jeff Beck 2001
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-19-2008, 07:31 AM
Bill Marcum
 
Posts: n/a
Default Re: SUID problem

On Wed, 13 Oct 2004 17:05:30 +0200, Marco De Vitis
<starless@spin.it> wrote:
> Hi, I'm having a problem on Debian Woody: I cannot seem to be able to
> correctly use the SUID attribute.
>
> Let's suppose I'm in /root and have a simple "test" script, for which the
> SUID attribute is set:
>

I don't know why it works on Mandrake, but the suid attribute is usually
ignored on scripts.



--
System Events
=-=-=-=-=-=-=
Sep 16 03:31:11 don kernel: lp0 on fire

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-19-2008, 07:32 AM
Marco De Vitis
 
Posts: n/a
Default Re: SUID problem

Il 13/10/2004, alle ore 18:52, Bill Marcum ha scritto:

> I don't know why it works on Mandrake, but the suid attribute is usually
> ignored on scripts.


Ouch! I'm afraid you're right, I've found some info about it... it seems
this behaviour is configured in the kernel, so that might be why it worked
on Mandrake.
Thanks.

--
Ciao,
Marco.

...."Homogenic", Björk 1997
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com