From: Dave . <dav...@ho...> - 2006-03-02 04:48:33
|
The script works, everything except for the echo command, I have also tried chmodding the script to 777 and giving the full path to the script. None worked. I think the problem is in the output, made by the echos getting displayed by the command ouput into webmin. >From: Jamie Cameron <jca...@we...> >Reply-To: web...@li... >To: web...@li... >Subject: Re: [webmin-l] (no subject) >Date: 02 Mar 2006 15:42:08 +1100 >MIME-Version: 1.0 >Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by >bay0-mc7-f1.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 1 >Mar 2006 20:43:04 -0800 >Received: from sc8-sf-list1-b.sourceforge.net >(sc8-sf-list1-b.sourceforge.net [10.3.1.7])by sc8-sf-spam1.sourceforge.net >(Postfix) with ESMTPid 1DAA988238; Wed, 1 Mar 2006 20:43:02 -0800 (PST) >Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] >helo=mail.sourceforge.net)by sc8-sf-list1.sourceforge.net with esmtp (Exim >4.30)id 1FEfeD-0000Ew-4gfor web...@li...; Wed, 01 >Mar 2006 20:42:41 -0800 >Received: from [70.86.4.226] (helo=virtualmin.com)by mail.sourceforge.net >with esmtp (Exim 4.44)id 1FEfeB-0003aw-FYfor >web...@li...; Wed, 01 Mar 2006 20:42:41 -0800 >Received: from [193.9.101.138] (CPE-60-230-176-210.vic.bigpond.net.au >[60.230.176.210])by virtualmin.com (Postfix) with ESMTP id C5401290B2Afor ><web...@li...>; Wed, 1 Mar 2006 22:00:04 -0600 >(CST) >X-Message-Info: StaYHEBmGBoCvpuFmTzcC8ri388uRzYOEtU/eIvXRcw= >References: <BAY...@ph...l> >Organization: X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) X-Spam-Score: 1.0 >(+) >X-Spam-Report: Spam Filtering performed by sourceforge.net.See >http://spamassassin.org/tag/ for more details.Report problems to >http://sf.net/tracker/?func=add&group_id=1&atid=2000011.0 FORGED_RCVD_HELO > Received: contains a forged HELO >Errors-To: web...@li... >X-BeenThere: web...@li... >X-Mailman-Version: 2.0.9-sf.net >Precedence: bulk >List-Unsubscribe: ><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=unsubscribe> >List-Id: Webmin users list <webadmin-list.lists.sourceforge.net> >List-Post: <mailto:web...@li...> >List-Help: ><mailto:web...@li...?subject=help> >List-Subscribe: ><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=subscribe> >List-Archive: ><http://sourceforge.net/mailarchive/forum.php?forum=webadmin-list> >X-Original-Date: 02 Mar 2006 15:42:08 +1100 >Return-Path: web...@li... >X-OriginalArrivalTime: 02 Mar 2006 04:43:04.0140 (UTC) >FILETIME=[CB0858C0:01C63DB3] > >Ok .. I have a couple of suggestions : > >1) Try using the full path to the testecho command , like /bin/testecho >2) Have the script perform some other action (like create a file in >/tmp) to see if it is being run at all. Perhaps it is executing, but the >output is not being displayed. > > - Jamie > >On Thu, 2006-03-02 at 15:37, Dave . wrote: > > Sorry, here is an updated version, it calls the shell script in the /bin > > directory owned by root. I get this when su - user in ssh and running >the > > script. > > > > [root@localhost ~]# su - kimball -s /bin/bash -c testecho > > asdf123 > > tester for me > > > > The shell script in /bin is named testecho and contains: > > > > #!/bin/bash > > echo "asdf123" > > echo "tester for me" > > > > > > >From: "Dave ." <dav...@ho...> > > >Reply-To: web...@li... > > >To: web...@li... > > >Subject: Re: [webmin-l] (no subject) > > >Date: Thu, 02 Mar 2006 04:25:41 +0000 > > >MIME-Version: 1.0 > > >X-Originating-IP: [69.120.56.144] > > >X-Originating-Email: [dav...@ho...] > > >X-Sender: dav...@ho... > > >Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by > > >bay0-mc6-f2.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Wed, >1 > > >Mar 2006 20:26:02 -0800 > > >Received: from sc8-sf-list1-b.sourceforge.net > > >(sc8-sf-list1-b.sourceforge.net [10.3.1.7])by >sc8-sf-spam2.sourceforge.net > > >(Postfix) with ESMTPid 5D66012580; Wed, 1 Mar 2006 20:26:01 -0800 >(PST) > > >Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] > > >helo=mail.sourceforge.net)by sc8-sf-list1.sourceforge.net with esmtp >(Exim > > >4.30)id 1FEfNo-0006ul-Hxfor web...@li...; Wed, >01 > > >Mar 2006 20:25:44 -0800 > > >Received: from bay112-f13.bay112.hotmail.com ([64.4.26.23] > > >helo=hotmail.com)by mail.sourceforge.net with esmtp (Exim 4.44)id > > >1FEfNn-0007cQ-Vnfor web...@li...; Wed, 01 Mar >2006 > > >20:25:44 -0800 > > >Received: from mail pickup service by hotmail.com with Microsoft >SMTPSVC; > > >Wed, 1 Mar 2006 20:25:43 -0800 > > >Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with >HTTP;Thu, > > >02 Mar 2006 04:25:41 GMT > > >X-Message-Info: StaYHEBmGBr9e1mDLkyZnxEz+Fa7zR2z6s6tUnotml0= > > >X-OriginalArrivalTime: 02 Mar 2006 04:25:43.0446 (UTC) > > >FILETIME=[5EBB0B60:01C63DB1] > > >X-Spam-Score: 0.5 (/) > > >X-Spam-Report: Spam Filtering performed by sourceforge.net.See > > >http://spamassassin.org/tag/ for more details.Report problems to > > >http://sf.net/tracker/?func=add&group_id=1&atid=2000010.5 >FROM_ENDS_IN_NUMS > > > From: ends in numbers0.0 MSGID_FROM_MTA_HEADER Message-Id was >added > > >by a relay > > >Errors-To: web...@li... > > >X-BeenThere: web...@li... > > >X-Mailman-Version: 2.0.9-sf.net > > >Precedence: bulk > > >List-Unsubscribe: > > > ><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=unsubscribe> > > >List-Id: Webmin users list <webadmin-list.lists.sourceforge.net> > > >List-Post: <mailto:web...@li...> > > >List-Help: > > ><mailto:web...@li...?subject=help> > > >List-Subscribe: > > > ><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=subscribe> > > >List-Archive: > > ><http://sourceforge.net/mailarchive/forum.php?forum=webadmin-list> > > >X-Original-Date: Thu, 02 Mar 2006 04:25:41 +0000 > > >Return-Path: web...@li... > > > > > > > > >The shell script works except for the echo command. When the command is >run > > >from custom commands module, it just says command > > >ouput from....comandhere > > >---then nothing. even though In my expierence the echo commands are > > >displayed. > > > > > > > > >>From: Jamie Cameron <jca...@we...> > > >>Reply-To: web...@li... > > >>To: web...@li... > > >>Subject: Re: [webmin-l] (no subject) > > >>Date: 02 Mar 2006 15:22:31 +1100 > > >>MIME-Version: 1.0 > > >>Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by > > >>bay0-mc5-f17.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); >Wed, 1 > > >>Mar 2006 20:24:06 -0800 > > >>Received: from sc8-sf-list1-b.sourceforge.net > > >>(sc8-sf-list1-b.sourceforge.net [10.3.1.7])by >sc8-sf-spam2.sourceforge.net > > >>(Postfix) with ESMTPid 0B36712F8D; Wed, 1 Mar 2006 20:24:06 -0800 >(PST) > > >>Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] > > >>helo=mail.sourceforge.net)by sc8-sf-list1.sourceforge.net with esmtp >(Exim > > >>4.30)id 1FEfLC-0006f6-1hfor web...@li...; Wed, >01 > > >>Mar 2006 20:23:02 -0800 > > >>Received: from [70.86.4.226] (helo=virtualmin.com)by >mail.sourceforge.net > > >>with esmtp (Exim 4.44)id 1FEfLB-0006j4-Axfor > > >>web...@li...; Wed, 01 Mar 2006 20:23:01 -0800 > > >>Received: from [193.9.101.138] (CPE-60-230-176-210.vic.bigpond.net.au > > >>[60.230.176.210])by virtualmin.com (Postfix) with ESMTP id >35B91290D86for > > >><web...@li...>; Wed, 1 Mar 2006 21:40:27 -0600 > > >>(CST) > > >>X-Message-Info: StaYHEBmGBoZSf8qHByhBqPPULjjyGY8XWrcM9Nv8uM= > > >>References: <BAY...@ph...l> > > >>Organization: X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) X-Spam-Score: >1.0 > > >>(+) > > >>X-Spam-Report: Spam Filtering performed by sourceforge.net.See > > >>http://spamassassin.org/tag/ for more details.Report problems to > > >>http://sf.net/tracker/?func=add&group_id=1&atid=2000011.0 >FORGED_RCVD_HELO > > >> Received: contains a forged HELO > > >>Errors-To: web...@li... > > >>X-BeenThere: web...@li... > > >>X-Mailman-Version: 2.0.9-sf.net > > >>Precedence: bulk > > >>List-Unsubscribe: > > > >><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=unsubscribe> > > >>List-Id: Webmin users list <webadmin-list.lists.sourceforge.net> > > >>List-Post: <mailto:web...@li...> > > >>List-Help: > > >><mailto:web...@li...?subject=help> > > >>List-Subscribe: > > > >><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=subscribe> > > >>List-Archive: > > >><http://sourceforge.net/mailarchive/forum.php?forum=webadmin-list> > > >>X-Original-Date: 02 Mar 2006 15:22:31 +1100 > > >>Return-Path: web...@li... > > >>X-OriginalArrivalTime: 02 Mar 2006 04:24:06.0730 (UTC) > > >>FILETIME=[25155AA0:01C63DB1] > > >> > > >>Ok .. how about if you try it with the actual command you were trying >to > > >>run from Webmin (assuming that this wasn't just an echo command too) ? > > >> > > >> - Jamie > > >> > > >>On Thu, 2006-03-02 at 15:16, Dave . wrote: > > >> > output from the su and echo command is: > > >> > > > >> > [root@localhost ~]# su - kimball -s /bin/sh -c "echo foo" > > >> > foo > > >> > > > >> > > > >> > >From: Jamie Cameron <jca...@we...> > > >> > >Reply-To: web...@li... > > >> > >To: web...@li... > > >> > >Subject: Re: [webmin-l] (no subject) > > >> > >Date: 02 Mar 2006 15:13:41 +1100 > > >> > >MIME-Version: 1.0 > > >> > >Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by > > >> > >bay0-mc10-f11.bay0.hotmail.com with Microsoft >SMTPSVC(6.0.3790.211); > > >>Wed, 1 > > >> > >Mar 2006 20:15:02 -0800 > > >> > >Received: from sc8-sf-list1-b.sourceforge.net > > >> > >(sc8-sf-list1-b.sourceforge.net [10.3.1.7])by > > >>sc8-sf-spam2.sourceforge.net > > >> > >(Postfix) with ESMTPid 0A9B712142; Wed, 1 Mar 2006 20:15:01 -0800 > > >>(PST) > > >> > >Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] > > >> > >helo=mail.sourceforge.net)by sc8-sf-list1.sourceforge.net with >esmtp > > >>(Exim > > >> > >4.30)id 1FEfCg-0005r2-EPfor web...@li...; >Wed, > > >>01 > > >> > >Mar 2006 20:14:14 -0800 > > >> > >Received: from [70.86.4.226] (helo=virtualmin.com)by > > >>mail.sourceforge.net > > >> > >with esmtp (Exim 4.44)id 1FEfCf-0003ac-20for > > >> > >web...@li...; Wed, 01 Mar 2006 20:14:14 >-0800 > > >> > >Received: from [193.9.101.138] >(CPE-60-230-176-210.vic.bigpond.net.au > > >> > >[60.230.176.210])by virtualmin.com (Postfix) with ESMTP id > > >>B776B290D86for > > >> > ><web...@li...>; Wed, 1 Mar 2006 21:31:37 >-0600 > > >> > >(CST) > > >> > >X-Message-Info: StaYHEBmGBqKz67fr+0tKypfpTIF8uL5vJMZk0dw5F8= > > >> > >References: <BAY...@ph...l> > > >> > >Organization: X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) >X-Spam-Score: > > >>1.0 > > >> > >(+) > > >> > >X-Spam-Report: Spam Filtering performed by sourceforge.net.See > > >> > >http://spamassassin.org/tag/ for more details.Report problems to > > >> > >http://sf.net/tracker/?func=add&group_id=1&atid=2000011.0 > > >>FORGED_RCVD_HELO > > >> > > Received: contains a forged HELO > > >> > >Errors-To: web...@li... > > >> > >X-BeenThere: web...@li... > > >> > >X-Mailman-Version: 2.0.9-sf.net > > >> > >Precedence: bulk > > >> > >List-Unsubscribe: > > >> > > > >> > ><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=unsubscribe> > > >> > >List-Id: Webmin users list <webadmin-list.lists.sourceforge.net> > > >> > >List-Post: <mailto:web...@li...> > > >> > >List-Help: > > >> > ><mailto:web...@li...?subject=help> > > >> > >List-Subscribe: > > >> > > > >> > ><https://lists.sourceforge.net/lists/listinfo/webadmin-list>,<mailto:web...@li...?subject=subscribe> > > >> > >List-Archive: > > >> > ><http://sourceforge.net/mailarchive/forum.php?forum=webadmin-list> > > >> > >X-Original-Date: 02 Mar 2006 15:13:41 +1100 > > >> > >Return-Path: web...@li... > > >> > >X-OriginalArrivalTime: 02 Mar 2006 04:15:02.0260 (UTC) > > >> > >FILETIME=[E08DD340:01C63DAF] > > >> > > > > >> > >On Thu, 2006-03-02 at 14:13, Dave . wrote: > > >> > > > I have a shell script run from the custom commands module. It >runs > > >> > > > successfully in a shell as well as in the custom commands >module > > >>when > > >> > >the > > >> > > > "Use User's Environment is UNCHECKED. However, when I check the > > >>"Use > > >> > >User's > > >> > > > Environment" no echo commands are displayed in the ouput for >the > > >> > >command. > > >> > > > The user is using a valid shell located at /bin/bash defined by >the > > >> > >shell > > >> > > > script. > > >> > > > Any Help appreciated. > > >> > > > > >> > >What happens if you login via SSH as root, and run a command like? >: > > >> > > > > >> > >su - USERNAME -s /bin/sh -c "echo foo" > > >> > > > > >> > >That is the command Webmin uses when the 'Use user's environment' > > >>option > > >> > >is selected. > > >> > > > > >> > > - Jamie > > >> > > > > >> > > > > >> > > > > >> > >------------------------------------------------------- > > >> > >This SF.Net email is sponsored by xPML, a groundbreaking scripting > > >>language > > >> > >that extends applications into web and mobile media. Attend the >live > > >> > >webcast > > >> > >and join the prime developer group breaking into this new coding > > >>territory! > > >> > > > >> > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > >> > >- > > >> > >Forwarded by the Webmin mailing list at > > >>web...@li... > > >> > >To remove yourself from this list, go to > > >> > >http://lists.sourceforge.net/lists/listinfo/webadmin-list > > >> > > > >> > > > >> > > > >> > > > >> > ------------------------------------------------------- > > >> > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > >>language > > >> > that extends applications into web and mobile media. Attend the >live > > >>webcast > > >> > and join the prime developer group breaking into this new coding > > >>territory! > > >> > > > > >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > >> > - > > >> > Forwarded by the Webmin mailing list at > > >>web...@li... > > >> > To remove yourself from this list, go to > > >> > http://lists.sourceforge.net/lists/listinfo/webadmin-list > > >> > > > >> > > >> > > >> > > >>------------------------------------------------------- > > >>This SF.Net email is sponsored by xPML, a groundbreaking scripting > > >>language > > >>that extends applications into web and mobile media. Attend the live > > >>webcast > > >>and join the prime developer group breaking into this new coding > > >>territory! > > > >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > >>- > > >>Forwarded by the Webmin mailing list at > > >>web...@li... > > >>To remove yourself from this list, go to > > >>http://lists.sourceforge.net/lists/listinfo/webadmin-list > > > > > > > > > > > > > > >------------------------------------------------------- > > >This SF.Net email is sponsored by xPML, a groundbreaking scripting >language > > >that extends applications into web and mobile media. Attend the live > > >webcast > > >and join the prime developer group breaking into this new coding >territory! > > > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > >- > > >Forwarded by the Webmin mailing list at >web...@li... > > >To remove yourself from this list, go to > > >http://lists.sourceforge.net/lists/listinfo/webadmin-list > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting >language > > that extends applications into web and mobile media. Attend the live >webcast > > and join the prime developer group breaking into this new coding >territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > - > > Forwarded by the Webmin mailing list at >web...@li... > > To remove yourself from this list, go to > > http://lists.sourceforge.net/lists/listinfo/webadmin-list > > > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live >webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >- >Forwarded by the Webmin mailing list at web...@li... >To remove yourself from this list, go to >http://lists.sourceforge.net/lists/listinfo/webadmin-list |