Amanda-Users

Re: su amanda doesn't have permissions

2003-08-08 19:02:55
Subject: Re: su amanda doesn't have permissions
From: Jon LaBadie <jon AT jgcomp DOT com>
To: Amanda Users <amanda-users AT amanda DOT org>
Date: Fri, 8 Aug 2003 19:01:07 -0400
On Fri, Aug 08, 2003 at 03:09:49PM -0700, S. Keel wrote:
> Hopefully someone here can help...I've been working through the
> Frankenlinux setup instructions along with the Using Amanda Chapter at
> Backupcentral to setup my site, but have run into a problem when I try to
> run...
> 
> su amanda -c "amlabel daily DailySet1-001" ...as root
> 
> bash reports that it cannot find 'amlabel'
> 
> 'amlabel' is installed into /usr/local/sbin, so I went ahead and added
> that path to my amanda user's $PATH environment variable, but it still
> doesn't work.  I'm hesitant to make changes to ENV_PATH and ENV_SUPATH in
> /etc/login.defs becuase I don't want every user to have elevated
> privileges.

Changing a user's PATH does not give them any more privileges
than they already have.  It just allows them to type "somecmd"
rather than "/somepath/somecmd".

> Does anyone have a suggestion.

Others have given you excellent suggestions.  Just a comment about
why your efforts did not work.

  su someone

when successful changes your effective identity, but does not change
your environment.  So if root did not have /usr/local/sbin in its
PATH, then neither will root su'ed to amanda.  It does not process
amanda's login files (.profile etc.).

On the other hand,

  su - someone

will process those login files and set you up with amanda's normal
environment rather than root's.  You will however, be working in
amanda's home directory, not the one from which you issued the su.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

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