The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to Redirect the error messages from Syslog file to our own Application Log File balasubramaniam HP-UX 3 04-17-2008 01:44 PM
redirect output to log file kalyanraj Shell Programming and Scripting 2 06-07-2007 12:40 AM
How to redirect std out and std err to same file 0ktalmagik Shell Programming and Scripting 2 07-04-2006 07:04 PM
can you redirect multiple files for input? Matrix_Prime UNIX for Dummies Questions & Answers 4 02-27-2005 07:07 PM
please help: how to redirect input into a variable artur80 Shell Programming and Scripting 2 11-17-2002 10:18 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-07-2008
bjornrud's Avatar
bjornrud bjornrud is offline
Registered User
  
 

Join Date: Oct 2004
Location: Oslo
Posts: 3
redirect input from file?

I need to run a command inside root-environment, and want to use:
su - root -c "some command..."
Then I am prompted for a password, of course.
Is it possible to put this password in a file, and present this files content, to the command above?
  #2 (permalink)  
Old 03-09-2008
msflying msflying is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 4
Quote:
Originally Posted by bjornrud View Post
I need to run a command inside root-environment, and want to use:
su - root -c "some command..."
Then I am prompted for a password, of course.
Is it possible to put this password in a file, and present this files content, to the command above?
Ithink you can write a shell which use funcs to solve this problem.And this shell can be encapsulate into a executable command .Make sure you change the password file's privilege to root only.But maybe there are still ways to crack this through your password file.If a lot of users in you OS,you'd better using "sudo".
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0