Re: [SLUG] kill user and print jobs script

2001-09-19 Thread Steve Kowalik

On Wed, Sep 19, 2001 at 05:58:02PM +1000, Jeff Waugh uttered:
> > Ideally what i would like is for a person to log in as an admin or similar
> > user and be able to kill off other users processes and print jobs/queues
> > etc.
> > 
> > this would be a restricted login.
> 
> Read the sudo(1) man page, it is just what you need.
> 
Orrr, you can stick the users in the lp group on a Debian box.

-- 
Steve
Picking a web browser for X is like deciding if you would rather be choked, 
strangled, or suffocated.

 PGP signature


Re: [SLUG] kill user and print jobs script

2001-09-19 Thread Matt Hope

On Wed, 19 Sep 2001, Alister Waller <[EMAIL PROTECTED]> wrote...

: I have the scripts done as I said, its how I can run them without being root
: thats the issue.
: 
: if I can't then root it is :)
: 

I'm pretty sure somewhere along the line, you have to run it as root.
I've seen sudo suggested - however there (can be) flaws with sudo. For
writing more secure sudo-like scripts, try "super"

Description: Execute commands setuid root
 Super allows specified users to execute scripts (or other commands)
 as if they were root; or it can set the uid and/or gid on a
 per-command basis before executing the command.  It is intended to be
 a secure alternative to making scripts setuid root.

I've found that for some scripts, say doing something with a tape unit,
that super fit my needs much better than sudo. YYMV.

HTH.

*dopey

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] kill user and print jobs script

2001-09-19 Thread Mike Holland

On Wed, 19 Sep 2001, Alister Waller wrote:

> Whats the best way to run a shell script so that it has the right
> persmissions to kill a user and stop/start and clear down print queues?

Your effective user-ID must either be root, or the user in question.
Why not run the script as root? (assuming its carefully checked and
tested) Your problem is not clear.
  You can use  'su', eg"su  -c "
If you are not already root, it will ask for the user's password.

  See also 'sudo'. Is that what you want?

-- 
Mike Holland  <[EMAIL PROTECTED]>
--==--
"Everybody is talking about the weather but nobody does anything
about it."  -- Mark Twain



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] kill user and print jobs script

2001-09-19 Thread Jeff Waugh



> Ideally what i would like is for a person to log in as an admin or similar
> user and be able to kill off other users processes and print jobs/queues
> etc.
> 
> this would be a restricted login.

Read the sudo(1) man page, it is just what you need.

- Jeff

-- 
 "What's up with that word though... it's like something you did to 
  frogs in grammar school." - Ani DiFranco on bisexuality   

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



RE: [SLUG] kill user and print jobs script

2001-09-19 Thread Alister Waller


Ideally what i would like is for a person to log in as an admin or similar
user and be able to kill off other users processes and print jobs/queues
etc.

this would be a restricted login.

I have the scripts done as I said, its how I can run them without being root
thats the issue.

if I can't then root it is :)

alister



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Bevan Broun
> Sent: Wednesday, 19 September 2001 2:59 PM
> To: Alister Waller
> Cc: Slug
> Subject: Re: [SLUG] kill user and print jobs script
>
>
> on Wed, Sep 19, 2001 at 02:43:14PM +1000, Alister Waller
> <[EMAIL PROTECTED]> wrote:
> > Whats the best way to run a shell script so that it has the right
> > persmissions to kill a user and stop/start and clear down print queues?
>
> You want to kill a user? Thats understandable but extreem, most of us just
> learn to live with them.
>
> > if I run it as root it works fine, as a user it complains about
> permissions
> > on files and directories and users etc
>
> We need more info on what you are trying to do. Kill all
> processes that are
> running as a particular user? Cant see that you could  do this without
> being root, unless you are themself.
>
> The print queue script will also depend on what print software you are
> using (and how it's been installed)
>
> BB
>
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
>


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] kill user and print jobs script

2001-09-18 Thread Bevan Broun

on Wed, Sep 19, 2001 at 02:43:14PM +1000, Alister Waller 
<[EMAIL PROTECTED]> wrote:
> Whats the best way to run a shell script so that it has the right
> persmissions to kill a user and stop/start and clear down print queues?

You want to kill a user? Thats understandable but extreem, most of us just
learn to live with them.

> if I run it as root it works fine, as a user it complains about permissions
> on files and directories and users etc

We need more info on what you are trying to do. Kill all processes that are
running as a particular user? Cant see that you could  do this without
being root, unless you are themself.

The print queue script will also depend on what print software you are
using (and how it's been installed)

BB

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



[SLUG] kill user and print jobs script

2001-09-18 Thread Alister Waller

Whats the best way to run a shell script so that it has the right
persmissions to kill a user and stop/start and clear down print queues?


if I run it as root it works fine, as a user it complains about permissions
on files and directories and users etc


regards

Alister


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug