Hi

On 5 April 2013 17:19, Graeme Porter <[email protected]> wrote:
> Thanks Michael, I've got my domain controller back!
>
> I'm now rather distinctly annoyed.  I *was* using a symbolic link in /usr/bin 
> called "samba" that was pointing to /usr/local/samba/sbin/samba - this was 
> the only way I found so far that I could avoid typing the whole command path 
> every time - probably because I still can't see a way to persistently and 
> globally add entries to the path variable (every time I tried this 
> previously, if I logged out and logged in as a different user, my changes to 
> the path were missing, and wouldn't even reappear when I logged back in as 
> myself).

Changing environment variables by typing something like this at the
shell prompt will only affect the shell you are currently running the
command in and other processes started by that shell (and processes
started by those processes etc.):

$ export PATH="/usr/local/samba/bin:/usr/local/samba/sbin:$PATH"

e.g. if you open two terminal windows and you type the above command
into one and then type "echo $PATH" into the other, you will see that
the second window doesn't see the updated PATH.  This is because when
each process starts it gets its own copy of the environment from its
parent.  Updating the environment of a process can only affect that
process and its children.

So if you want to affect the environment for all processes you have to
change file that will be read by the shell when it starts.  e.g.
/etc/environment or /home/user/.profile.

See also the "System-wide environment variables" section here:
https://help.ubuntu.com/community/EnvironmentVariables

-- 
Michael Wood <[email protected]>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to