![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do i change to super user then revert back to ordinary user ,using shell script? | wrapster | Shell Programming and Scripting | 3 | 06-04-2008 04:11 AM |
| Run the script from another user | Krishnaramjis | Shell Programming and Scripting | 4 | 11-01-2007 10:34 PM |
| Running script from other user rather than login user | rawatds | Shell Programming and Scripting | 2 | 08-25-2006 12:51 AM |
| Have script run as a different user | mikey20 | Shell Programming and Scripting | 1 | 11-04-2005 11:12 AM |
| log out user in script | whatisthis | Shell Programming and Scripting | 6 | 04-25-2005 10:26 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
another user script
Hi,
Suppose I am user1 and I want to call a script using user2 (i.e., as if I call it while I am user2). However, I want to specify user2 password progromatically (without requiring user1 to enter it). Is this possible? Thank you in advance Best Regards |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Check out expect, located at:expect.nist.gov .
|
|
#3
|
|||
|
|||
|
These can be possibilities
1)set 'Set user-id' bit to user2 script.So that when u run user2.scr while login as user1 still it runs as if user2 is executing it. I am not sure whether it creates file etc where user1 has no permission.. for e.g. chmod 4755 user2.scr 2)Dynamically create .netrc file and rexec the user2 script GOOD LUCK |
|
#4
|
|||
|
|||
|
Thank you very much
|
|
#5
|
||||
|
||||
|
can't assign SUID to a shell script
I didn't think you can use SUID for a shell script?
I believe that you can setup "sudo" privledges for the other user. Here are a few posts that may help. Changing effective user Stciky bits
__________________
My brain is your brain |
|
#6
|
||||
|
||||
|
Re: can't assign SUID to a shell script
Quote:
It surprised me too. |
|
#7
|
|||
|
|||
|
How abt trying to add an entry in /etc/inetd.conf for the script to be invoked under user2, and Start a program from user1 which will make an inetd connection to the inetd port of user2's script entry. You dont need the user2's passwd in this case.
|
|||
| Google The UNIX and Linux Forums |