Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter information at a prompt

Status
Not open for further replies.

majorbroncosfan

Programmer
Feb 23, 2001
121
US
I have a script that I have written, but need to be able to enter the password prompt to get into root.

Does anyone know how to do this?

 
O.K. That may have been a bit vague.

Here's what I need:

1. I enter su -
2. the prompt comes up with "Password:" and I need to have this populate with the password.

I need to do this to give temporary access for a particular function that regular users do not need to have.
 
I would write a small C program that does an SUID. Or others may suggest using 'sudo.' 'expect' would be another way to handle interactive scripting.
 
sudo is definitely the way to do it (guess I'm "others").

It's well designed, well tested, gives you a high granularity of control, and logs all activity.

You can get it at
Another option might be to use the AIX Roles functionality. Is the function you want to give temporary access to an AIX administrative one?



Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
 
Me too (use sudo I mean) although I hate depending on something so useful thats not supported by IBM. I have only ran into trouble with it one time after a major upgrade, so be sure you include it on your list of things to QA after ptf installs and upgrades.
 
WiccaChic,

Did it at least fail securely, failing to give privileges and/or run, as opposed to granting privileges it shouldn't have?



Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top