RE: [Perl-beginners] Perl script to switch user to root.

From: Remko Lodder (remko_at_elvandar.org)
Date: 03/04/04


To: "Silky Manwani" <silkym@mac.com>, <beginners@perl.org>
Date: Thu, 4 Mar 2004 19:08:09 +0100

perhaps you should let the script do something like SUDO,
and permit it to run a single command, or limited commandset
of root operations, even without password, (you dont want that actually
but since sudo can log stuff, it might be what you aim for)

Cheers

--
Kind regards,
Remko Lodder
Elvandar.org/DSINet.org
www.mostly-harmless.nl Dutch community for helping newcomers on the
hackerscene
-----Oorspronkelijk bericht-----
Van: perl-beginners-bounces@lists.elvandar.org
[mailto:perl-beginners-bounces@lists.elvandar.org]Namens Silky Manwani
Verzonden: donderdag 4 maart 2004 19:03
Aan: beginners@perl.org
Onderwerp: [Perl-beginners] Perl script to switch user to root.
Hello,
I want to write a perl script to switch user (to root). The problem is
that since it asks for the password, I am not sure how I would pass it
thru the script. I know I can run the "su root" with the system command
in perl, but how do I take care of passing the password.
Thanks.
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>
_______________________________________________
Perl-beginners mailing list
Perl-beginners@lists.elvandar.org
http://lists.elvandar.org/mailman/listinfo/perl-beginners


Relevant Pages

  • Re: Card Reader
    ... Running your script ... instead of sudo is worthless because your script *can't do ... And of course it doesn't ask for a root password, ... >> That's just more bullshit Bryan, and you might as well leave ...
    (rec.photo.digital)
  • Re: any way to track commands of a user logged in through ssh
    ... applies _to that command only_. ... the command they want to run with 'sudo', ... I use/run a Shell command that requires 'root' privileges...Especially ... So what do you think about creating a separate 'group' for certain ...
    (comp.os.linux.misc)
  • Re: Problems with su/sudo
    ... admin account on the command line and then sudo from there. ... Having the root account "disabled" ... the above sequence does work from an admin account in the default ...
    (comp.sys.mac.system)
  • Re: Vote for new Ubuntu Feature---Lets try it again
    ... If I sudo <command> (and am ... authorised to so that command) my privileges are upped to root (or ... you want to do several commands as root. ...
    (Ubuntu)
  • Re: Im Beaten
    ... sudo is a command that means "do as su. ... then the command is run as root. ... man sudoers has some examples on how to allow an app to be ran ...
    (Ubuntu)