Ask a Question related to Linux / Unix Administration, Design and Development.
-
Kay #1
suid - question
Hello,
hope, the following is not too elementary. My OS is Linux.
I want to run a command like "fuser -9 -k /dev/lp0" in a shell script
called i.e. reset_port, which has to be executable by
non-superusers. The process blocking the device seems to belong to the
user "lp". When executing the script as root user, the process using
the device is killed as desired. But when running the script as a
normal user, fuser /dev/lp0 neither shows nor kills the process.
I have tried permissions which render the following attributes by
ls -l (output truncated after user and group name):
-rwSr-xr-x 1 lp lp
-rwSr-sr-x 1 lp lp
-rwSr-xr-x 1 root root
-rwSr-sr-x 1 root root
I understand, that suid (chmod u+s reset_port) should let the script
run with superuser privileges, but in my case it does not work, so I
guess, I have misunderstood something.
Thanks for answers!
Kay
Kay Guest
-
Newbie Question: Biz Card Template Question
Hi, I got the Pagemaker PlugIn - I am using one of the templates for Business Cards - the elements appear to be grouped (bound box all around when I... -
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you
<RonGrossi382872@yahoo.com> wrote in message news:1114393703.900419.199790@f14g2000cwb.googlegroups.com... This is the most important question of... -
Bill Marcum #2
Re: suid - question
On Thu, 01 Apr 2004 18:40:09 +0200, Kay
<news_nospam@web.de> wrote:For security reasons, the suid bit is ignored on scripts. Try sudo.>
> I understand, that suid (chmod u+s reset_port) should let the script
> run with superuser privileges, but in my case it does not work, so I
> guess, I have misunderstood something.
>
--
Nothing is illegal if one hundred businessmen decide to do it.
-- Andrew Young
Bill Marcum Guest
-
Davide Bianchi #3
Re: suid - question
Kay <news_nospam@web.de> wrote:
No, on scripts you can't use the SUID bit. You need to use sudo> I understand, that suid (chmod u+s reset_port) should let the script
> run with superuser privileges,
within the script.
Davide
--
| It would be nice if the Food and Drug Administration stopped issuing
| warnings about toxic substances and just gave me the names of one or
| two things still safe to eat.
|
Davide Bianchi Guest
-
Barry Margolin #4
Re: suid - question
In article <6w65cj8xee.fsf@pino.iskp.uni-bonn.de>,
Kay <news_nospam@web.de> wrote:Most versions of Unix ignore setuid on scripts, because there are> I understand, that suid (chmod u+s reset_port) should let the script
> run with superuser privileges, but in my case it does not work, so I
> guess, I have misunderstood something.
security implications of it.
Use sudo.
--
Barry Margolin, [email]barmar@alum.mit.edu[/email]
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Barry Margolin Guest
-
Kay #5
Re: suid - question
Barry Margolin <barmar@alum.mit.edu> writes:
Hello!> In article <6w65cj8xee.fsf@pino.iskp.uni-bonn.de>,
> Kay <news_nospam@web.de> wrote:>>> I understand, that suid (chmod u+s reset_port) should let the script
>> run with superuser privileges, but in my case it does not work, so I
>> guess, I have misunderstood something.
> Most versions of Unix ignore setuid on scripts, because there are
> security implications of it.
>
> Use sudo.
>
> --
> Barry Margolin, [email]barmar@alum.mit.edu[/email]
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
Thanks for the answer, I was not very aware of this utility. Now I got
it working.
I should like to put a further question, which as well may be the
result of a certain lack of understanding.
sudo offers the possibility of letting user A run commands as user
B. If NOPASSWD is not specified in the sudoers file, user A would have
to know the password of user B, so that he could log in as user B
anyway. Do I get it correctly, then, that this way of applying sudo
would not make much sense?
Cheers,
Kay
Kay Guest
-
Davide Bianchi #6
Re: suid - question
Kay <news_nospam@web.de> wrote:
No. The password requested by sudo is user's A password. Sudo need> If NOPASSWD is not specified in the sudoers file, user A would have
> to know the password of user B
to be sure that is user A trying to execute the command and not
someone else that just stumbled into an open console. Otherwise
the whole exercise is pointless and user A can just su - B and
become user B with flying colors.
Davide
--
| In a medium in which a News Piece takes a minute and an "In-Depth"
| Piece takes two minutes, the Simple will drive out the Complex. --
| Frank Mankiewicz
|
Davide Bianchi Guest



Reply With Quote

