What commandline are you running? If it works by hand but
not from a script then that suggests that it might be that the
program needs a TTY to run properly - you could try running
"dbclient -t" in the cronjob?

Testing here redirecting output seems to work as below (the shell is
zsh). I've added -T to be similar to how a cronjob would run.

Matt

evil:~/src/dropbear ./dbclient -T localhost find /etc/lvm > /dev/null
m...@localhost's password: 
find: `/etc/lvm/cache': Permission denied
find: `/etc/lvm/backup': Permission denied
find: `/etc/lvm/archive': Permission denied
[1]    22210 exit 1     ./dbclient -T localhost find /etc/lvm > /dev/null

evil:~/src/dropbear ./dbclient -T localhost find /etc/lvm 2> /dev/null
m...@localhost's password: 
/etc/lvm
/etc/lvm/cache
/etc/lvm/backup
/etc/lvm/lvm.conf
/etc/lvm/archive
[1]    22216 exit 1     ./dbclient -T localhost find /etc/lvm 2> /dev/null


On Fri, Jul 23, 2010 at 10:53:49PM +0000, mbus25 . wrote:
> 
> Hello, im fighting with dbclient to redirect the ouput of an remotely 
> executed command, but it seems not possible
> 
> i can redirect the stderr before the connection to the server ( for example 
> connection refused error ), but after it doesn't work.
> 
> 
> Im running dbclient from an script that is executed by cron, when i run the 
> script by hand it works perfectly, but running it from cron the output inst 
> redirected :(
> 
> anyone have some idea ???
> thanks in advance..
> 
> Nuno                                    
> _________________________________________________________________
> Correio Electrónico e Muito Mais Enquanto Viaja. Obtenha o Windows Live 
> Hotmail Gratuito.
> https://signup.live.com/signup.aspx?id=60969

Reply via email to