Amanda-Users

Re: can only run amanda tests as root

2006-08-02 07:17:29
Subject: Re: can only run amanda tests as root
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Wed, 02 Aug 2006 07:09:01 -0400
On Wednesday 02 August 2006 05:15, Stephen Carter wrote:
>I found it.
>
>It was udev causing the problems, which I can only thing must be a
> problem for many SuSE users running amanda with tape changers out there.
>
>In /etc/udev/rules.d/50-udev-default.rules there is a line to create sg*
> devices like: KERNEL=="sg*"       NAME="%k", GROUP="disk", MODE="640"
>
>This was from a clean install of SLES 10, and will only give members of
> the disk group read access to /dev/sg* devices, which is why I couldn't
> run it as amanda. Removing the MODE comment (defaults to rw for both
> user & group) and a reboot fixed it.
>
Then you don't have your amanda user in the correct group, amanda should be 
a member of the group disk in your case.

This walks and quacks like the incorrect installation duck, amanda should 
be configured and built by the user amanda (or whoever is actually going 
to run amanda, and NOT root) and this user should be a member of the group 
that includes disk and backup.

However, after amanda has been built by this user, then amanda must be 
installed by root, thereby setting up all these permissions and setuids 
automaticly.

>
>Stephen Carter
>Retrac Networking Limited
>www: http://www.retnet.co.uk
>Ph: +44 (0)7870 218 693
>Fax: +44 (0)870 7060 056
>CNA, CNE 6, CNS, CCNA, MCSE 2003
>
>>>> "Stephen Carter" <Stephen AT retnet.co DOT uk> 08/02/06 9:33 AM >>>
>
>I figured that part out, and running mtx - f /dev/sg0 inquiry then again
> for sg1 showed that my drive was on sg0 and the autoloader was on sg1.
>
>All the mtx and amtape commands work when being run as the root user, so
> I don't think this is a configuration file issue. I think it's more of a
> setup issue with users / perms but I just can't see it...
>
>
>Stephen Carter
>Retrac Networking Limited
>www: http://www.retnet.co.uk
>Ph: +44 (0)7870 218 693
>Fax: +44 (0)870 7060 056
>CNA, CNE 6, CNS, CCNA, MCSE 2003
>
>>>> Brian Cuttler <brian AT wadsworth DOT org> 08/01/06 9:16 PM >>>
>
>The robot/picker/whatever is a different device on most systems
>from the tape drive, I've seen it as a different device/SCSI ID
>and as the same SCSI ID/different LUN, depending on the implementation.
>
>You have to check the devices for the robot in this case.
>
>On Tue, Aug 01, 2006 at 09:10:57PM +0100, Stephen Carter wrote:
>> I've got my user amanda who is a member of the disk group, and although
>> permissions on all amanda files seem fine, when I try to run su amanda
>> -  c "/usr/sbin/amtape DailySet1 show"
>>
>> I get the error
>> amtape: could not get changer info: no slots available
>>
>> I can however run this successfully as root.
>>
>> My tape device is /dev/sg0 and the changer is /dev/sg1. Both have
>> permissions root:disk (along with everything else in /dev it appears)
>>
>> My amanda config files are in /etc/amanda/DailySet1 and amanda is the
>> owner of /etc/amanda and all files beneath that.
>>
>> I'm running SLES 10 and installed Amanda through YaST which is v2.4.5
>>
>> I also uninstalled that and tried doing it directly from source, with
>> exactly the same problem...
>>
>> Any help would be great.
>>
>> Thanks!
>>
>>
>> Stephen Carter
>> Retrac Networking Limited
>> www: http://www.retnet.co.uk
>> Ph: +44 (0)7870 218 693
>> Fax: +44 (0)870 7060 056
>> CNA, CNE 6, CNS, CCNA, MCSE 2003
>
>---
>   Brian R Cuttler                 brian.cuttler AT wadsworth DOT org
>   Computer Systems Support        (v) 518 486-  1697
>   Wadsworth Center                (f) 518 473-  6384
>   NYS Department of Health        Help Desk 518 473-  0773

-- 
Cheers, Gene
People having trouble with vz bouncing email to me should add the word
'online' between the 'verizon', and the dot which bypasses vz's
stupid bounce rules.  I do use spamassassin too. :-)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.