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: Apple recommending anti-virus software for Macs?
    ... > To be ultra-safe with the 'rm' command, ... Not a bad idea for root, It would drive me nuts in my user account. ... downloads directory and executing it. ... That I type an EOF is a trivial difference versus 'sudo' exiting ...
    (comp.sys.mac.system)
  • 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: [kde] su identification
    ... assumes that you wish to invoke the root account and will demand Root ... A user may ONLY sudo as allowed in the /etc/sudoers ... allowing a command with any parameters ... This config allows my normal user to do whatever he'd normally be able to ...
    (KDE)
  • Re: Clams.....
    ... either by su> password> Kate, ... running in root. ... have you set up sudo? ... the command sudo gedit /etc/filename would ask for the user ...
    (Fedora)
  • 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)