LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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: 63
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



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 08:40 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
Open Source Consulting | Domain Registration