Menu

#13 sudo command is not executed at remote hosts

open
nobody
None
5
2005-08-01
2005-08-01
No

flexbackup v1.2.1-2 at debian testing is working fine
locally with a new unprivileged user who is allowed to
do the requiered executables by using sudo.

I have setup the same user at a remote host within the
same lan network with no password and pupkey ssh login.
Works fine.

But flexbackup even after having recognized that sudo
is to be used, forgets about that and tries to execute
the commands without sudo prefixed.

See the log excerpt (dokumentenserver is lokal,
fileserver remote):

---schnipp---
flexbackup@dokumentenserver:~$ /usr/bin/flexbackup -n
-set fileserver -full

flexbackup version 1.2.1
(http://flexbackup.sourceforge.net)

path dump = sudo /sbin/dump
path restore = sudo /sbin/restore
(debug) no backup or mt commands will be executed
(debug) no old stamps or old log files will be removed
|------------------------------------------------------------
| Checking 'buffer' on this machine...
(debug) sh /tmp/buftest.localhost.20000.sh
Ok
| Checking /bin/sh on this machine...
(debug) set x = 1 && test $x && echo csh:yes; echo
tcsh:$tcsh; echo bash:$BASH_VERSION; echo
zsh:$ZSH_VERSION;+echo ksh:$KSH_VERSION
bash1
| Checking shell on fileserver...
(debug) ssh -l flexbackup fileserver 'set x = 1 && test
$x && echo csh:yes; echo tcsh:$tcsh; echo
+bash:$BASH_VERSION; echo zsh:$ZSH_VERSION; echo
ksh:$KSH_VERSION'
bash1
| Checking for required programs on host fileserver...
(debug) ssh -l flexbackup fileserver "sh -c 'type touch
2>&1; type rm 2>&1; type sudo find 2>&1; type printf
+2>&1; type gzip 2>&1; type buffer 2>&1; type sudo
/sbin/dump 2>&1'"
| Checking 'buffer' on host fileserver...
(debug) cat /tmp/buftest.fileserver.20000.sh | (ssh -l
flexbackup fileserver 'cat >
+/tmp/buftest.fileserver.20000.sh; sh
/tmp/buftest.fileserver.20000.sh; rm -f
+/tmp/buftest.fileserver.20000.sh')
Ok
|------------------------------------------------------------
| Doing level 0 backup of set fileserver using dump
| Found directory index key 200507281126
| Backup set "fileserver" (fileserver:/
fileserver:/boot fileserver:/home fileserver:/usr
fileserver:/var )
|------------------------------------------------------------
(debug)
$::index{200507281126|fileserver-root.0.200507281450.dump.gz}
= level 0 fileserver:/ Thu Jul 28
+14:50:17 2005 from dokumentenserver
| Backup of: fileserver:/
| NOTE: $exclude_expr is ignored for type=dump
| NOTE: $prune is ignored for type=dump
| Date of this level 0 backup: Thu Jul 28 14:50:17 2005
| Date of last level 0 backup: the epoch
|------------------------------------------------------------
|------------------------------------------------------------
/tmp/collectexit.20000.sh ssh -l flexbackup fileserver
'dump -0 -b 10 -a \
-f - / | gzip -4 | buffer -m 10m -p 75 -s 10k -t ' | \
/tmp/collectexit.20000.sh buffer -m 10m -p 75 -s 10k
-t -o \

"/mnt/usb/systembackup/fileserver-root.0.200507281450.dump.gz"
[ ! -e /tmp/exitstatus.20000 ]
|------------------------------------------------------------
(debug) command output would be here
|------------------------------------------------------------
| Backup start: Thu Jul 28 14:50:17 2005
| Backup end: Thu Jul 28 14:50:17 2005
|------------------------------------------------------------
|------------------------------------------------------------
(debug)
$::index{200507281126|fileserver-boot.0.200507281450.dump.gz}
= level 0 fileserver:/boot Thu Jul 28
+14:50:17 2005 from dokumentenserver
| Backup of: fileserver:/boot
| NOTE: $exclude_expr is ignored for type=dump
| Date of this level 0 backup: Thu Jul 28 14:50:17 2005
| Date of last level 0 backup: the epoch
|------------------------------------------------------------
/tmp/collectexit.20000.sh ssh -l flexbackup fileserver
'dump -0 -b 10 -a \
-f - /boot | gzip -4 | buffer -m 10m -p 75 -s 10k -t
' | \
/tmp/collectexit.20000.sh buffer -m 10m -p 75 -s 10k
-t -o \

"/mnt/usb/systembackup/fileserver-boot.0.200507281450.dump.gz"
[ ! -e /tmp/exitstatus.20000 ]
|------------------------------------------------------------
(debug) command output would be here
|------------------------------------------------------------
| Backup start: Thu Jul 28 14:50:17 2005
| Backup end: Thu Jul 28 14:50:17 2005
|------------------------------------------------------------
|------------------------------------------------------------
(debug)
$::index{200507281126|fileserver-home.0.200507281450.dump.gz}
= level 0 fileserver:/home Thu Jul 28
+14:50:17 2005 from dokumentenserver
| Backup of: fileserver:/home
| NOTE: $exclude_expr is ignored for type=dump
| Date of this level 0 backup: Thu Jul 28 14:50:17 2005
| Date of last level 0 backup: the epoch
|------------------------------------------------------------
...
---schnapp---

This is obviouly an error in the flexbackup script. How
to fix that?

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.