×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Pel Wrapper Program

Pel Wrapper Program

Pel Wrapper Program

(OP)

I am new to Perl and need a resource or information to give lower level users acess to root to perform an automated function. I was told that this could be accomplished in perl.

RE: Pel Wrapper Program

There are mechanisms to do this in Perl - but there are safeguards that try and make it safe as well.

I'm not comfortable explaining - in detail - how to do this in a public forum but start by looking at:

1) Perl has to have been installed to allow this; if you're using v4 look for "taintperl" in the documentation.
2) Get the Camel book.
3) Unless you're using AIX it might be worthwhile looking at setuid scripts.

Perl is a *good* mechanism for doing this kind of work because of all the checks it does.

Regards

Mike
---
Mike_Lacey@Cargill.Com

RE: Pel Wrapper Program

I agree with Mike, although I'm always nervous of scripting things that run as root... What if I somehow put a problem in that ended up doing something as disastrous as "rm -fr /" as while I was root...

Preferably, ditch perl altogether and look at sudo. This let's normal users run programs as root by supplying their own login password.

Sudo has a configuration file that defines which users can run which programs. So, if a user's account became compromised you would not have a wide open system.

You could then set up your perl script owned and executable by root only, and have access to it controlled by sudo. Another advantage of this would be that the program would only be available to users authorised by sudo, and not to eceryone who could access it.

Can't remember the URL for sudo, but a search on your local SunSite should bring back plenty of hits.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close