Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: root-owned script needs to "shell out" to bash as a non-privileged user. How?

by choroba (Abbot)
on Jan 16, 2013 at 16:28 UTC ( #1013611=note: print w/ replies, xml ) Need Help??


in reply to root-owned script needs to "shell out" to bash as a non-privileged user. How?

Instead of su, use sudo:

system '/usr/bin/sudo', '-u', $username, '/bin/bash', '-i';
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: root-owned script needs to "shell out" to bash as a non-privileged user. How?
Download Code
Re^2: root-owned script needs to "shell out" to bash as a non-privileged user. How?
by mrfirmware (Initiate) on Jan 16, 2013 at 16:51 UTC
    Ok, color me embarrassed. That worked great. Thank you very much.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013611]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-09-16 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls