On Sat, 4 Dec, 2021 at 2:36 PM, Charles Curley 
<charlescur...@charlescurley.com> wrote:
 

To: 
Cc: amanda-users@amanda.orgOn Fri, 03 Dec 2021 23:20:29 -0800
Gene Heskett <ghesk...@shentel.net<mailto:ghesk...@shentel.net>> wrote:

> Trying to setup bullseye's version of amanda to run on bullseye, but
> apparently  its confused as to user or paths, not sure which.
> 
> Sanitized pw entry for amanda:
> amanda:x:1001:1001:amanda#####,,,:/home/amanda:/bin/bash

No, Gene. If you install the .deb amanda package, passwd looks like so:

root@hawk:~# grep ^backup /etc/passwd
backup:x:34:34:backup:/var/backups:/bin/bash
root@hawk:~# 

except that I change the shell to bash (instead of /usr/sbin/nologin)
so that it works with ssh.



Did that too, now the account is usable.


What you are showing looks like the upstream package, not the Debian
package. You don't need a user with UID above 1000 for amanda

> Sanitized backup in /etc/group:
> disk:x:6:backup
> tape:x:26:backup
> backup:x:34:
> amanda:x:1001:backup

Similarly,

root@hawk:~# grep ^backup /etc/group
backup:x:34:
root@hawk:~#
 
> I Put the former /usr/local/etc/amanda/Daily contents in
> /etc/amanda/Daily  for bullseye version:

Watch the capitalization. Is it Daily or daily?
typu Caps=good


Did you run amcheck?


This is after fixing passwd:


backup@coyote:/root$ amcheck Daily
amcheck: critical (fatal): Cannot create debug file 
"/var/log/amanda/server/amcheck.20211204183810.debug": Permission denied
amcheck: Cannot create debug file 
"/var/log/amanda/server/amcheck.20211204183810.debug": Permission denied
/usr/lib/x86_64-linux-gnu/amanda/libamanda-3.5.1.so(+0x3ab97)[0x7f18483adb97]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_logv+0x219)[0x7f184827b309]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log+0x8f)[0x7f184827b59f]
/usr/lib/x86_64-linux-gnu/amanda/libamanda-3.5.1.so(debug_open+0x186)[0x7f18483adf46]
amcheck(main+0xb2)[0x55e9aece8ae2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea)[0x7f1848061d0a]
amcheck(_start+0x2a)[0x55e9aece9efa]



So I'll go check perms for /var/log/amanda
doesn't make it work:


root@coyote:/var/log# chown -R amanda:amanda amanda
root@coyote:/var/log# su amanda
amanda@coyote:/var/log$ amcheck Daily
ERROR: must be executed as the 'backup' user instead of the 'amanda' user
       Change user to 'backup' or change dumpuser to 'amanda' in amanda.conf
amanda@coyote:/var/log$ 
exit
root@coyote:/var/log# chown -R backup:backup  amanda
root@coyote:/var/log# su backup
backup@coyote:/var/log$ amcheck Daily
ERROR: must be executed as the 'amanda' user instead of the 'backup' user
       Change user to 'amanda' or change dumpuser to 'backup' in amanda.conf
backup@coyote:/var/log$ 





Its all in the debs default locations, which is completely different from
the .configure;make;sudo make install locations, and all my backups
were made with my wrapper scripts. Basically it can't find its ass with either 
or both hands, acting like its not reading amanda.conf because
is not looking in /etc/amanda/Daily, but in /etc/amanda when the config dir is 
a subdir Daily at that location. So debian in packaging it has managed to break 
is AFAIAK. I refuse to pull amanda.conf up one level
because that totally destroys the ability to have more than one config.


I have the srcs for 3.5.1 here, I've recovered them from the backup

tgz ball. But it won't even configure with the usual configuration driver,
exiting the make as amanda with looks bogus but it is a showstopper:


/usr/bin/ld: 
./.libs/libtestutils.a(testutils.o):/home/amanda/amanda-3.5.1/common-src/testutils.h:78:
 multiple definition of `tu_debugging_enabled'; 
amflock-test.o:/home/amanda/amanda-3.5.1/common-src/testutils.h:78: first 
defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2333: amflock-test] Error 1
make[3]: Leaving directory '/home/amanda/amanda-3.5.1/common-src'
make[2]: *** [Makefile:2133: all] Error 2
make[2]: Leaving directory '/home/amanda/amanda-3.5.1/common-src'
make[1]: *** [Makefile:1718: all-recursive] Error 1
make[1]: Leaving directory '/home/amanda/amanda-3.5.1'
make: *** [Makefile:1642: all] Error 





Then run:
> root@coyote:/etc/amanda# /usr/sbin/amgetconf  Daily dumpuser
> amanda
> works fine as root,
> but:
> 
> root@coyote:/etc/amanda# su amanda -c "/usr/sbin/amgetconf  Daily

"amanda" is the user the upstream package creates and uses. The Debian
package uses the pre-existing user "backup". So:

root@hawk:~# su - backup
backup@hawk:~$ amgetconf DailySet1 dumpuser
backup
backup@hawk:~$ 



And that works after fixing passwd, group was fine but amanda is still
user 1001.


> dumpuser" parse error: could not open conf file
> '/etc/amanda/amanda.conf': Permission denied
> 
> Its also the wrong path, s/b /etc/amanda/Daily/amanda.conf
> 
> 
> So somethings aglay yet, but what???

You seem to have installed both the upstream amanda package and the
Debian package, and managed to conflate the two. That won't work.

Back out the upstream package entirely, and continue with the Debian
package. Remove the Debian packages. Kill off /home/amanda.


That has about 20 years of amanda tarballs in it. I'd druther not.



Use find to
seek and destroy any file or directory with either owner or group
amanda. Get rid of any executables from the package. Get rid of the
entries in passwd and group. Kill off any executables. Then re-install
the Debian amanda packages.


That, in my present state of recovery would kill any chance of getting
my data back. I have located in /amandatapes, all the level.0 backups,
and copied them to a subdir on my 1.tT raid10, and am slowly 

unpacking them one at a time to recover data. some of which is 20
years old.


And even FF is being a PITA, I just had to restart it 3 times before 

it would show me the text of your very helpful message.



Any way. an amcheck is nothing but errors.


And I'm no longer able to access amanda.conf:
root@coyote:/var/log# amgetconf Daily dumpuser
'/etc/amanda/Daily/amanda.conf', line 236: error: not a keyword.
'/etc/amanda/Daily/amanda.conf', line 236: end of line is expected
amgetconf: errors processing config file at /usr/sbin/amgetconf line 363.

So I changed -R ownership of /var/log/amanda to amanda:backup
but an amcheck Daily still exits:
amanda@coyote:/etc/amanda/Daily$ amcheck Daily
ERROR: must be executed as the 'backup' user instead of the 'amanda' user
       Change user to 'backup' or change dumpuser to 'amanda' in amanda.conf

but in amanda.conf


Now I have it returning dumpuser correctly when amanda asks amgetconf, but 
amcheck still has /tmp perms problems:
amanda@coyote:/etc/amanda/Daily$ amcheck Daily
ERROR: could not open temporary amcheck output file 
/tmp/amanda/amcheck.temp.230845: Permission denied
       Check permissions
So teeny progress, what's next?


Thanks Charles
Cheers, Gene





Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/
.

Reply via email to