Re: system() with 2 commands



In article <1114177533.708450.220440@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, sitnam81
wrote:
> Does that command work -- "sudo -u root"?
> The man for root says -u is for any user OTHER than root:
> -u The -u (user) option causes sudo to run the specified
> command as a user other than root. To specify a uid
> instead of a username, use "#uid".
> Thanks for the recommendation about expect, this looks like it will
> help with the passwd stuff.

It should work just fine. Typically, '-u root' is redundant because the default
user to run as *is* root...

Kevin


--
Unix Guy Consulting, LLC
Unix and Linux Automation, Shell, Perl and CGI scripting
http://www.unix-guy.com
.



Relevant Pages

  • Re: Strong Security Aspects of Unix OS:
    ... >Hi ...i'am doing a report on the strong and weak aspects of the Unix ... The root causes for process failures might well be security risks ... > Another strong aspect i thought of is the file permission, a owner ... Actually I'd like to get VMS like permission system on ...
    (comp.security.unix)
  • Re: New Suse user..not very impressed so far.
    ... "Root" is always meant as a top level in a hierarchy. ... In fact, many of the core commands of Unix were developed in the 1970s, ... MySQL (from YaST)? ... Oracle? ...
    (alt.os.linux.suse)
  • Re: Willing to bet this is Windows at its best
    ... I can't get jack done on UNIX without su to root first. ... Would you accept reboot as a legitimate option on your VMS machines? ... Bad programming is bad programming. ...
    (comp.os.vms)
  • Re: Why I hate this so called OS
    ... with Unix there is more front end work but if it's done right it stays up ... Each time I trust Solaris to do autoinstall, I wind up with a root ... > install themselves in root. ...
    (comp.unix.solaris)
  • Re: Why I hate this so called OS
    ... > As a manager without FT Unix staff I need to install a few Sun boxes ... Each time I trust Solaris to do autoinstall, I wind up with a root ... > install themselves in root. ...
    (comp.unix.solaris)