Bacula-users

Re: [Bacula-users] What is the bacula user's home directory?

2009-01-16 15:43:16
Subject: Re: [Bacula-users] What is the bacula user's home directory?
From: Martin Simmons <martin AT lispworks DOT com>
To: pascal-list AT LEXUM.UMontreal DOT CA
Date: Fri, 16 Jan 2009 20:39:14 GMT
>>>>> On Fri, 16 Jan 2009 09:33:46 -0500, Pascal Clermont said:
> 
> Martin Simmons wrote:
> >>>>>> On Wed, 14 Jan 2009 05:15:01 -0800, Kevin Keane said:
> >> In my configuration, the bacula-dir and bacula-sd both run as user 
> >> bacula rather than root, as recommended.
> >>
> >> Now I am trying to run a Run Before script that includes wget to a 
> >> password-protected site. The user name and password are in a .netrc 
> >> file. It doesn't work - wget does not use the user name and password 
> >> stored from the .netrc file. Apparently, the Run Before Job script is 
> >> using root's environment and home directory even when running as user 
> >> "bacula". Consequently, .netrc is unreadable to the script.
> >>
> >> Is there a way to work around this without putting the user name and 
> >> password into the script itself?
> > 
> > If wget is using $HOME to find the home directory, then you'll need to set
> > that in the run before script to make it work.
> > 
> > __Martin
> IDK if you got your answer, but "vipw" displays 
> "bacula:x:405:6:Bacula:/var/lib/bacula:/sbin/nologin" as you can see on 
> my setup it is in /var/lib/bacula , vipw is your friend.

It all depends on how wget finds the home directory.  If it uses getpwuid with
the effective user id of the process, then the value shown in the password
file will be used.

OTOH, if it uses $HOME from the environment, like many programs do, then it
will be necessary to be set that explicitly (because Bacula doesn't).

__Martin

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

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