Amanda-Users

Re: Changing User when using RPMs

2005-11-28 11:05:12
Subject: Re: Changing User when using RPMs
From: Jay Fenlason <fenlason AT redhat DOT com>
To: Broderick Wood <bmw AT cs.ualberta DOT ca>
Date: Mon, 28 Nov 2005 10:58:46 -0500
On Sun, Nov 27, 2005 at 08:48:09PM -0700, Broderick Wood wrote:
> Is there anyone out there who is using the RedHat RPMs abut has to change 
> the user that runs the backups?
> 
> ie.  I want to change the name from "amanda" to "backup" or some other ID 
> but runtar seems to have the id "amanda" hard coded into it.

Yep.  It's a royal pain.  I've had
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124510
open since the dawn of time (or so it seems) because it's so hard to
fix.  Here's what you have to do.

1) Remember that Red Hat cannot support hand-built rpms.  If you're
paying for support, you should contact your support person instead of
following these direction.

2) Download and install the appropriate amanda-{version}-{release}.src.rpm
for your release of Red Hat Linux/Red Hat Enterprise Linux/Fedora Core.

3) Edit /usr/src/redhat/SPECS/amanda.rpm.  Change every occurance of
"amanda" as a username to the new username.  These will be the useradd
line, and the %attr lines.  Also change the release number by adding
your name, or initials or something to it.

4) Build new Amanda rpms with "rpmbuild -ba amanda.spec" in the
/usr/src/redhat/SPECS directory.

5) Back up your current Amanda files.

6) Remove the old Amanda rpms.

7) Make sure the "amanda:" entry is gone from /etc/passwd.  Remove it
by hand (with userdel) if you have to.

8) Install the new rpms you just built.  They'll be in
/usr/src/redhat/RPMS/{your arch}/

If you can find a way to have rpm automatically change the username on
upgrade, let me know so I can make that change to the rawhide Amanda
rpms, and we can save every other Red Hat / Fedora user this pain.

                        -- JF

<Prev in Thread] Current Thread [Next in Thread>