Precisely Speaking
May 21, 2012, 07:04:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: So what's news with you?  Tell us about it in "Getting To Know You"!
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Using su from Unidata  (Read 743 times)
Thomas
Professional
***
Posts: 21


« on: February 09, 2011, 08:04:51 AM »

I am trying to create a program to do certain things, which require root permissions.  So, I am trying to create a PCPERFORM string to log in as root (su) and execute the command.

Is there a way this could be done?
Logged

* Government is not the solution to our problem; government is the problem - Ronald Wilson Reagan
* Democrats are the party of food stamps and Republicans are the party of paychecks. - Newt Gingrich
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #1 on: February 14, 2011, 02:53:23 PM »

Been a while since I tried that.  Can you echo the password, pipe it into su followed by the command?
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
slestak
Uber-Pro
****
Posts: 69



« Reply #2 on: February 16, 2011, 10:39:43 AM »

sudo may give you the kind of control you want.  You can give the non-root user the permission to run the command, and can even have it not prompt for password.
Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #3 on: February 16, 2011, 10:58:56 AM »

Ah yes, sudo.  Good call!
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
slestak
Uber-Pro
****
Posts: 69



« Reply #4 on: February 21, 2011, 12:00:37 PM »

Mike Perzl has rpms for aix here.

http://www.perzl.org/aix/index.php?n=Main.Sudo

Logged
Thomas
Professional
***
Posts: 21


« Reply #5 on: February 24, 2011, 09:24:17 AM »

Thank you so much for your prompt reply.  Sorry for my late reply, but I've been quite busy lately and haven't had a chance to check in.
Logged

* Government is not the solution to our problem; government is the problem - Ronald Wilson Reagan
* Democrats are the party of food stamps and Republicans are the party of paychecks. - Newt Gingrich
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!