Results 1 to 7 of 7

Thread: Trouble installing client 3.3.3 on Ubuntu 12.04. amandabackup user exists in LDAP

  1. #1
    Join Date
    Feb 2013
    Location
    Canberra, Australia
    Posts
    7

    Default Trouble installing client 3.3.3 on Ubuntu 12.04. amandabackup user exists in LDAP

    Hi,

    I am having trouble installing the backup client 3.3.3 onto my Ubuntu 12.04 x86_64 server.

    This server is performing a RADIUS role so it has been configured to connect to an Active Directory LDAP server to authenticate RADIUS users. We have previously installed amanda backup client on some Windows servers so the amandabackup user already exists in AD.

    Code:
    root@server:/var/log/amanda# getent passwd amandabackup
    amandabackup:*:5008:5003:amandabackup:/usr/home/amandabackup:/bin/sh
    I have manually added amandabackup user to the disk and tape groups

    Code:
    root@server:/var/log/amanda# egrep 'disk|tape' /etc/group
    disk:x:6:amandabackup
    tape:x:26:amandabackup
    I created a link from the users home directory to the default /var/lib/amanda directory.

    Code:
    root@server:/var/log/amanda# ls -l /usr/home/
    total 0
    lrwxrwxrwx 1 root root 15 Apr 11 16:18 amandabackup -> /var/lib/amanda
    Despite all of this the amanda client does not appear to be running and listening on port 10080.

    Code:
    root@server:/var/log/amanda# lsof -i :10080 -i :10081
    COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
    xinetd  16371 root    5u  IPv4 2351824      0t0  TCP *:10081 (LISTEN)
    Here is the install.log
    Code:
    root@server:/var/log/amanda# cat install.log 
    Apr 11 2013 16:22:17: Preparing to install: Amanda Enterprise Server 3.3.3
    Apr 11 2013 16:22:17: Checking for user: amandabackup
    Apr 11 2013 16:22:17: The Amanda user 'amandabackup' exists on this system.
    Apr 11 2013 16:22:17: Verify amandabackup's primary group = disk 
    Apr 11 2013 16:22:17: amandabackup not a member of disk
    Apr 11 2013 16:22:17: groupadd: groupadd: group 'disk' already exists
    Apr 11 2013 16:22:17: Adding amandabackup to disk
    Apr 11 2013 16:22:17: usermod: usermod: group 'domain' does not exist
    Apr 11 2013 16:22:17: Nonfatal ERROR: Failed to add disk.
    Apr 11 2013 16:22:17: Nonfatal ERROR:  Amanda will not run until 'amandabackup' is a member the
     preceeding group.  Install will continue...
    Apr 11 2013 16:22:17: Verify amandabackup is a member of tape.
    Apr 11 2013 16:22:17: Verify amandabackup's shell is /bin/bash.
    Apr 11 2013 16:22:17: WARNING:  amandabackup default shell= /bin/bash
    Apr 11 2013 16:22:17: WARNING: amandabackup existing shell: 
    Apr 11 2013 16:22:17: WARNING: The user 'amandabackup' has a non-default shell. Other shells have not been tested.
    Apr 11 2013 16:22:17: WARNING: The user 'amandabackup' must have its home directory set to
    '/var/lib/amanda' Please correct before using Amanda.
    Apr 11 2013 16:22:17: Found existing /var/log/amanda
    Apr 11 2013 16:22:17: Creating /var/log/amanda.
    Apr 11 2013 16:22:17: Preinstall done.
    Apr 11 2013 16:22:17: Installed xinetd config for amandaclient.
    Apr 11 2013 16:22:17: restarting xinetd.
    Apr 11 2013 16:22:17: /etc/init.d/xinetd: xinetd stop/waiting
    xinetd start/running, process 16371
    Apr 11 2013 16:22:17: Creating /etc/amandates.
    Apr 11 2013 16:22:17: Ensuring correct permissions for '/etc/amandates'.
    Apr 11 2013 16:22:17: Checking '/var/lib/amanda/.am_passphrase' file.
    Apr 11 2013 16:22:17: Info: /var/lib/amanda/.am_passphrase already exists.
    Apr 11 2013 16:22:17: Creating encryption key for amcrypt
    Apr 11 2013 16:22:17: Info: Encryption key '/var/lib/amanda/.gnupg/am_key.gpg' already exists.
    Apr 11 2013 16:22:17: Ensuring correct permissions for '/var/lib/amanda/.gnupg'.
    Apr 11 2013 16:22:17: gpg: gpg: CAST5 encrypted data
    gpg: encrypted with 1 passphrase
    gpg: WARNING: message was not integrity protected
    Apr 11 2013 16:22:17: Checking '/var/lib/amanda/.amandahosts' for 'root amindexd amidxtaped' entries.
    Apr 11 2013 16:22:17: Searching .amandahosts for ^localhost[[:blank:]]\+root[[:blank:]]\+amindexd[[:blank:]]\+amidxtaped
    Apr 11 2013 16:22:17: Searching .amandahosts for ^localhost.localdomain[[:blank:]]\+root[[:blank:]]\+amindexd[[:blank:]]\+amidxtaped
    Apr 11 2013 16:22:17: Checking '/var/lib/amanda/.amandahosts' for 'amandabackup amdump' entries.
    Apr 11 2013 16:22:17: Searching .amandahosts for ^localhost[[:blank:]]\+amandabackup[[:blank:]]\+amdump
    Apr 11 2013 16:22:17: Searching .amandahosts for ^localhost.localdomain[[:blank:]]\+amandabackup[[:blank:]]\+amdump
    Apr 11 2013 16:22:17: Ensuring correct permissions on .amandahosts
    Apr 11 2013 16:22:17: Setting ownership and permissions for '/var/lib/amanda/.ssh' and '/var/lib/amanda/.ssh/id_rsa_amdump*'
    Apr 11 2013 16:22:17: Setting ownership and permissions for '/var/lib/amanda/.ssh' and '/var/lib/amanda/.ssh/id_rsa_amrecover*'
    Apr 11 2013 16:22:17: Checking for '/var/lib/amanda/.profile'.
    Apr 11 2013 16:22:17: Checking for /usr/sbin in path statement.
    Apr 11 2013 16:22:17: Setting ownership and permissions for '/var/lib/amanda/.profile'
    Apr 11 2013 16:22:17: Checking '/etc/amanda/amanda-client.conf' file.
    Apr 11 2013 16:22:17: Note: /etc/amanda/amanda-client.conf exists. Please check /var/lib/amanda/example/amanda-client.conf for updates.
    Apr 11 2013 16:22:17: Checking for '/tmp/amanda' dir.
    Apr 11 2013 16:22:17: Amanda  installation complete.
    Apr 11 2013 16:22:19: Installed xinetd config for zmrecover.
    Apr 11 2013 16:22:19: Reloading xinetd configuration...
    Apr 11 2013 16:22:19: Amanda Extensions installation complete.
    Below is the result of running amandad manually as the amandabackup user.
    Code:
    root@server:/var/log/amanda/amandad# su - amandabackup
    $ /usr/lib/amanda/amandad &
    $ cd /var/log/amanda/amandad
    $ ls -al
    total 16
    drwx------ 2 amandabackup domain users 4096 Apr 11 16:47 .
    drwxr-x--- 4 amandabackup disk         4096 Apr 11 16:46 ..
    -rw-r----- 1 amandabackup domain users 3139 Apr 11 16:46 amandad.20130411164603.debug
    -rw-r----- 1 amandabackup domain users 2985 Apr 11 16:47 amandad.20130411164757.debug
    [1] + Done                       /usr/lib/amanda/amandad
    $ cat /var/log/amanda/amandad/amandad.20130411164757.debug 
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad: pid 18578 ruid 5008 euid 5008 version 3.3.3: start at Thu Apr 11 16:47:57 2013
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad: security_getdriver(name=BSDTCP) returns 0x7ff284b219a0
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad: version 3.3.3
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:     build: VERSION="Amanda-3.3.3"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            BUILT_DATE="Wed Jan 9 13:21:03 PST 2013" BUILT_MACH=""
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            BUILT_REV="5098" BUILT_BRANCH="zmanda_3_3_3"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            CC="x86_64-linux-gnu-gcc"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:     paths: bindir="/usr/bin" sbindir="/usr/sbin"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            libexecdir="/usr/lib" amlibexecdir="/usr/lib/amanda"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            mandir="/usr/share/man" AMANDA_TMPDIR="/tmp/amanda"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            AMANDA_DBGDIR="/var/log/amanda" CONFIG_DIR="/etc/amanda"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            DEV_PREFIX="/dev/" RDEV_PREFIX="/dev/" DUMP="/sbin/dump"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            RESTORE="/sbin/restore" VDUMP=UNDEF VRESTORE=UNDEF
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            XFSDUMP="/sbin/xfsdump" XFSRESTORE="/sbin/xfsrestore"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            VXDUMP=UNDEF VXRESTORE=UNDEF
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            SAMBA_CLIENT="/usr/bin/smbclient" GNUTAR="/bin/tar"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            COMPRESS_PATH="/bin/gzip" UNCOMPRESS_PATH="/bin/gzip"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:             LPRCMD=UNDEF  MAILER=UNDEF
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            listed_incr_dir="/var/lib/amanda/gnutar-lists"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:     defs:  DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            DEFAULT_TAPE_SERVER="localhost" DEFAULT_TAPE_DEVICE=""
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            NEED_STRSTR AMFLOCK_POSIX AMFLOCK_FLOCK AMFLOCK_LOCKF
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            AMFLOCK_LNLOCK SETPGRP_VOID ASSERTIONS AMANDA_DEBUG_DAYS=4
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            BSD_SECURITY USE_AMANDAHOSTS CLIENT_LOGIN="amandabackup"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            CHECK_USERID HAVE_GZIP COMPRESS_SUFFIX=".gz"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            COMPRESS_FAST_OPT="--fast" COMPRESS_BEST_OPT="--best"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad:            UNCOMPRESS_OPT="-dc"
    Thu Apr 11 16:47:57 2013: thd-0x101f400: amandad: getpeername returned: Socket operation on non-socket
    Thu Apr 11 16:48:27 2013: thd-0x101f400: amandad: timeout exit
    Thu Apr 11 16:48:27 2013: thd-0x101f400: amandad: pid 18578 finish time Thu Apr 11 16:48:27 2013
    Is there some way that I can install the amanda client so that it will run as a different user?

    Any other ideas as to how I might be able to get the client to work on this server?

    Thanks.
    Mike

  2. #2
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,049

    Default

    You don't even post the error you get from amanda.

    Quote Originally Posted by mhirt View Post
    Despite all of this the amanda client does not appear to be running and listening on port 10080.

    Code:
    root@server:/var/log/amanda# lsof -i :10080 -i :10081
    COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
    xinetd  16371 root    5u  IPv4 2351824      0t0  TCP *:10081 (LISTEN)
    What's the xinetd configuration? Do you restarted it? What it print in the system logs?
    Which auth are you using?

  3. #3
    Join Date
    Feb 2013
    Location
    Canberra, Australia
    Posts
    7

    Default

    Quote Originally Posted by martineau View Post
    You don't even post the error you get from amanda.
    The error in the install.log was posted.

    Code:
    Apr 11 2013 16:22:17: Preparing to install: Amanda Enterprise Server 3.3.3
    Apr 11 2013 16:22:17: Checking for user: amandabackup
    Apr 11 2013 16:22:17: The Amanda user 'amandabackup' exists on this system.
    Apr 11 2013 16:22:17: Verify amandabackup's primary group = disk 
    Apr 11 2013 16:22:17: amandabackup not a member of disk
    Apr 11 2013 16:22:17: groupadd: groupadd: group 'disk' already exists
    Apr 11 2013 16:22:17: Adding amandabackup to disk
    Apr 11 2013 16:22:17: usermod: usermod: group 'domain' does not exist
    Apr 11 2013 16:22:17: Nonfatal ERROR: Failed to add disk.
    Apr 11 2013 16:22:17: Nonfatal ERROR:  Amanda will not run until 'amandabackup' is a member the
     preceeding group.  Install will continue...
    Apr 11 2013 16:22:17: Verify amandabackup is a member of tape.
    Apr 11 2013 16:22:17: Verify amandabackup's shell is /bin/bash.
    Apr 11 2013 16:22:17: WARNING:  amandabackup default shell= /bin/bash
    Apr 11 2013 16:22:17: WARNING: amandabackup existing shell: 
    Apr 11 2013 16:22:17: WARNING: The user 'amandabackup' has a non-default shell. Other shells have not been tested.
    Apr 11 2013 16:22:17: WARNING: The user 'amandabackup' must have its home directory set to
    '/var/lib/amanda' Please correct before using Amanda.
    Apr 11 2013 16:22:17: Found existing /var/log/amanda
    Apr 11 2013 16:22:17: Creating /var/log/amanda.
    Apr 11 2013 16:22:17: Preinstall done.
    Apr 11 2013 16:22:17: Installed xinetd config for amandaclient.
    Apr 11 2013 16:22:17: restarting xinetd.
    Apr 11 2013 16:22:17: /etc/init.d/xinetd: xinetd stop/waiting
    xinetd start/running, process 16371
    Quote Originally Posted by martineau View Post
    What's the xinetd configuration? Do you restarted it? What it print in the system logs?
    Which auth are you using?
    xinetd is restarted during installation but I restarted it manually and checked the logs anyway. Here is the syslog for the xinetd restart.

    Code:
    Apr 12 10:15:40 server xinetd[16371]: Exiting...
    Apr 12 10:15:40 server xinetd[16123]: Reading included configuration file: /etc/xinetd.d/amandaclient [file=/etc/xinetd.conf] [line=14]
    Apr 12 10:15:40 server xinetd[16123]: Reading included configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.d/chargen] [line=18]
    Apr 12 10:15:40 server xinetd[16123]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28]
    Apr 12 10:15:40 server xinetd[16123]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26]
    Apr 12 10:15:40 server xinetd[16123]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25]
    Apr 12 10:15:40 server xinetd[16123]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=26]
    Apr 12 10:15:40 server xinetd[16123]: Reading included configuration file: /etc/xinetd.d/zmrecover [file=/etc/xinetd.d/zmrecover] [line=28]
    Apr 12 10:15:40 server xinetd[16123]: removing chargen
    Apr 12 10:15:40 server xinetd[16123]: removing chargen
    Apr 12 10:15:40 server xinetd[16123]: removing daytime
    Apr 12 10:15:40 server xinetd[16123]: removing daytime
    Apr 12 10:15:40 server xinetd[16123]: removing discard
    Apr 12 10:15:40 server xinetd[16123]: removing discard
    Apr 12 10:15:40 server xinetd[16123]: removing echo
    Apr 12 10:15:40 server xinetd[16123]: removing echo
    Apr 12 10:15:40 server xinetd[16123]: removing time
    Apr 12 10:15:40 server xinetd[16123]: removing time
    Apr 12 10:15:40 server xinetd[16123]: Port not specified and can't find service: amanda with getservbyname
    Apr 12 10:15:40 server xinetd[16123]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
    Apr 12 10:15:40 server xinetd[16123]: Started working: 1 available service
    Here is the config as created by the installer.

    Code:
    user@server:/var/log$ cat /etc/xinetd.d/amandaclient 
    # default: on
    #
    # description: The Amanda backup client should be enabled for systems
    #              which will be backed up by an Amanda backup server.
    
    service amanda
    {
    	disable		= no
    	flags           = IPv4
    	socket_type	= stream
    	protocol	= tcp
    	wait		= no
    	user		= amandabackup
    	group		= disk
    	groups		= yes
    	server		= /usr/lib/amanda/amandad
    	server_args     = -auth=bsdtcp amdump
    }
    user@server:/var/log$
    Here is the passwd section from nsswitch.conf

    Code:
    user@server:/var/log$ cat /etc/nsswitch.conf |grep passwd
    passwd: files winbind
    passwd_compat: nis

  4. #4
    Join Date
    Feb 2013
    Location
    Canberra, Australia
    Posts
    7

    Thumbs up amandad running

    I have been able to get the amandad service running via xinetd. Check Hosts in the ZMC has succeeded. Will see what happens when I run a backup.

    The fix was to edit /etc/xinetd.d/amandaclient and add "type = UNLISTED" and "port = 10080". I had to use UNLISTED because xinetd would complain about a protocol combination for amanda/tcp not being found in /etc/services even though it is there.

    Full xinetd configuration for amandaclient:

    Code:
    root@server:/etc/xinetd.d# cat amandaclient 
    # default: on
    #
    # description: The Amanda backup client should be enabled for systems
    #              which will be backed up by an Amanda backup server.
    
    service amanda
    {
    	disable		= no
    	type		= UNLISTED
    	flags           = IPv4
    	socket_type	= stream
    	protocol	= tcp
    	wait		= no
    	user		= amandabackup
    	group		= disk
    	groups		= yes
    	server		= /usr/lib/amanda/amandad
    	server_args     = -auth=bsdtcp amdump
    	port            = 10080
    }

  5. #5
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,049

    Default

    I was going to tell you to add it to /etc/services, maybe it have multiple entry for amanda or 10080? Ot it is not use at all, what in /etc/nsswitch.conf for services?

  6. #6
    Join Date
    Feb 2013
    Location
    Canberra, Australia
    Posts
    7

    Default

    The backups ran successfully over the weekend.

    To follow up with martineau's questions. It appears that /etc/services does have multiple entries for amanda.

    Code:
    $ egrep 'amanda|10080' /etc/services 
    amanda		10080/tcp			# amanda backup services
    amanda		10080/udp
    kamanda		10081/tcp			# amanda backup services (Kerberos)
    kamanda		10081/udp
    amandaidx	10082/tcp			# amanda backup services
    amidxtape	10083/tcp			# amanda backup services
    $ grep services /etc/nsswitch.conf 
    services: compat
    services_compat: nis
    I will remove the UNLISTED and port entries from the xinetd config and remove the duplicates from /etc/services and see if that solves the issue.
    Last edited by mhirt; April 14th, 2013 at 03:50 PM. Reason: fixed code output

  7. #7
    Join Date
    Feb 2013
    Location
    Canberra, Australia
    Posts
    7

    Thumbs up Solved

    After commenting out the lines I had added to the xinetd config for amanda and adding "db files" to the services config in nsswitch.conf, xinetd is now starting amandaclient as expected.

    Code:
    $ cat /etc/xinetd.d/amandaclient 
    # default: on
    #
    # description: The Amanda backup client should be enabled for systems
    #              which will be backed up by an Amanda backup server.
    
    service amanda
    {
    	disable		= no
    #	type		= UNLISTED
    	flags           = IPv4
    	socket_type	= stream
    	protocol	= tcp
    	wait		= no
    	user		= amandabackup
    	group		= disk
    	groups		= yes
    	server		= /usr/lib/amanda/amandad
    	server_args     = -auth=bsdtcp amdump
    #	port            = 10080
    }
    And adding db files to nsswitch.conf

    Code:
    $ grep services /etc/nsswitch.conf
    services: compat db files
    services_compat: nis
    Thanks martineau for pointing me in the right direction.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •