[sudo-users] Sudo or Cd command is not working

Gyan_raj kumar gyan_imp at yahoo.com
Thu Dec 24 01:03:28 EST 2009

Hi ,
 My requirement is take backup as sudo admin.
      a.  apsr8007 machine.
     [gkuma14 at apsr8007 gyan]$ ssh -t gkuma14 at cwsapp02.phs.com 'sudo -u wladmin -s -H ;cd /home/stage/doamins/cw_stage1 '
 after executing now i am in wladmin user,
       [wladmin at cwsapp02 gyan]$ pwd
    but cd /home/stage/doamins/cw_stage1 'is not working 
      b. now i want to connect cwsapp02 machine(Three requirement).Because here  20 machine(cwsapp03,05...20)
          It is very diffcult to take backup for logfile.Taking backup we have to do "sudo -u wladmin -s -H' and go to
          the perticular path cd /home/stage/domains/cw_stage1/ 
              Three steps:
                      1> sudo -u wladmin -s -H                =  do the sudo
                      2> cd /home/stage/domains/cw_stage1/    =  go to the pertucular path
                      3> mv log logs.241209                   =  Take backup



More information about the sudo-users mailing list