LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-27-2008, 11:00 AM   #1
JohnnyRuin
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
scripting "execute this as user/passwd"


Hi

I've got a perl based website running as 'nobody' with the need to execute a privileged command (modify stuff in /home/someuser). As it happens I've got the username and password in the perl environment. The su command would work for me except it doesn't allow the password to be entered in a script. I don't want to allow 'nobody' any permissions via sudo.

In summary, given I'm running as 'nobody' I want to script executing commands as 'someuser' and I have the password for the account for 'somesuser'. What's the recommended approach?
 
Old 06-28-2008, 01:54 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Options:

*) Create a setuid program (not shell script!) that does what you need.
*) Create a daemon program that listens for requests, changing privileges as needed.
*) http://httpd.apache.org/docs/1.3/suexec.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Enterprise 3 08-03-2007 09:27 AM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Newbie 1 06-14-2005 07:51 PM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Newbie 2 06-14-2005 02:49 PM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Programming 1 06-14-2005 08:18 AM
Ordinary user can execute the "halt" command ederts Linux - Newbie 7 05-24-2001 11:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration