Re: su Command from a script with Password?

From: Chris F.A. Johnson (c.f.a.johnson_at_rogers.com)
Date: 05/31/03

  • Next message: Chris Vine: "Re: c++"
    Date: 31 May 2003 21:43:54 GMT
    
    

    On Fri, 30 May 2003 at 20:49 GMT, Greg Ennis wrote:
    > Group,
    >
    > I need to use the su command from a script with a known password. The
    > origen account is not root, but the password to the destination
    > account is known. I can not figure out a way to switch to that
    > account inside a script unless I am no the root account. Is there a
    > way to supply the password on the command line so that using the root
    > account is not necessary.
    >
    > I am running SCO OpenServer(TM) Release 3.2v5.0.5

       Use sudo to give the user permission to execute a particular script
       or program as root.

    -- 
        Chris F.A. Johnson                        http://cfaj.freeshell.org
        ===================================================================
        My code (if any) in this post is copyright 2003, Chris F.A. Johnson
        and may be copied under the terms of the GNU General Public License
    

  • Next message: Chris Vine: "Re: c++"

    Relevant Pages

    • Re: [opensuse] Post installation queries (FIRST successful installation of Linux)
      ... I want that ease that typing 'su' changes the prompt to ... 'root' without all the times giving the password. ... keep the user account for tyro, just delete all directories except 'tyro' ... the size of my .bash-history file so if I ever forget a command, ...
      (SuSE)
    • Re: [kde] exporting from kmail (Was: Kmail2/Akonadi issue on FreeBSD.)
      ... script send it a check mail command. ... I'm not aware of a dbus command for it -- that doesn't mean it doesn't ... but of course this setup was implemented long before dbus ... and that's the current account unless you've changed to a different one. ...
      (KDE)
    • RE: Linux hacked
      ... > script that performs an MD5 hash on certain files and then compares the ... > boot normally and you should be able to login as root with your new ... > crackers break in their account and from there they do more damage. ...
      (Security-Basics)
    • Re: exempt a machine from a group policy
      ... The computer name in an ACL normally only gets used when there is an attempt ... implicity authorize Modify access by the machine account. ... the script is NOT executed *by* a machine. ...
      (microsoft.public.windows.group_policy)
    • Re: Populate email attribute in AD
      ... I have other OUs where I would like to use this script as well so ... it would be preferable to pass the OU LDAP path as a command line argument. ... >> I do not have to use the CSV file. ... >> If the script encounters a blank username field it will skip that account, ...
      (microsoft.public.windows.server.scripting)