Re: Amrecover hangs after restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 20 December 2020 11:02:15 am Gene Heskett via tde-users wrote:
> On Sunday 20 December 2020 10:50:44 Michael via tde-users wrote:
> > On Saturday 19 December 2020 07:39:34 pm Gene Heskett via tde-users
>
> wrote:
> > > On Saturday 19 December 2020 19:15:47 Michael via tde-users wrote:
> > > > On Saturday 19 December 2020 11:15:43 am Michael via tde-users
>
> wrote:
> > > > > On Saturday 19 December 2020 08:34:37 am Gene Heskett via
> > > > > tde-users
> >
> > wrote:
> > > > > > On Saturday 19 December 2020 03:32:07 Gene Heskett wrote:
> > > > >
> > > > > Hi Gene,
> > > > >
> > > > > Thanks for posting the dcop commands, I’ve been meaning to add
> > > > > similar to my local nightly backup for awhile.
> > > > >
> > > > > On the permissions issue:
> > > > >
> > > > > Use sudo, basically the same as using sudo for yourusername to
> > > > > root, but replace root with yourusername and yourusername with
> > > > > amanada. And then get sudo to run without password.
> > > > >
> > > > >  -
> > > > > https://www.golinuxhub.com/2013/12/how-to-give-permission-to-use
> > > > >r-to -run/ - https://linuxhandbook.com/sudo-without-password/
> > >
> > > This second URL showed me how to edit the sudoers file and add this:
> > >
> > > amanda ALL=(ALL) NOPASSWD:/opt/trinity/bin/dcop
> > >
> > > But it still fails:
> > > root@coyote:~$ su amanda -c "/opt/trinity/bin/dcop --user gene
> > > --all-sessions kmail KMailIface resumeBackgroundJobs"
> >
> > sudo NOT su...  Read the first link, they go together...  AFIK, you'll
> > need to reformat the whole command for sudo (as it is not the same
> > format as su).
> >
> > Don't run as root either!  Run it as plain amanda, even if you have to
> > stick it in a test script and add it to amanda cron to kick it off.
>
> No, since they've built a paranoid security wall between me and anybody
> else, I'll run it as me.

Well, that is sucky :(

For the display issues earlier, try one of these:

export DISPLAY=:0
export DISPLAY=:0.0

Under your username do:

echo $DISPLAY

and I’m guessing use that.  Mine is “:0”, the :0.0 was used in a cron entry 
itself*, so probably not the one to use.

This is from an old bash script I ran in root cron that needed to also start 
something as myself.  It was on a Ubuntu 14.04 box, it’s Debian based but 
might not be the exact syntax anymore.

  export DISPLAY=:0
  sudo -H -u michael bash -c '/usr/bin/progname &'

As long as you have the right sudoers entry (it looked like you had way 
overkill, but it should work), running the same in the amanda script should 
work.  I’ll guess this should be the full syntax of the lines you need:

  export DISPLAY=:0
  sudo -H -u gene bash -c '/opt/trinity/bin/dcop kmail KMailIface 
pauseBackgroundJobs'
  >>do backup stuff<<
  sudo -H -u gene bash -c '/opt/trinity/bin/dcop kmail KMailIface 
resumeBackgroundJobs'

HTH,
Michael

* Cron entry was like:
export DISPLAY=:0.0 ; /home/michael/common/bin/bashscript.sh

____________________________________________________
tde-users mailing list -- users@xxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxx
Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@xxxxxxxxxxxxxxxxxx




[Index of Archives]     [Trinity Devel]     [KDE]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux