[Samba] RE: [Samba]smb.conf and Environment Variables

Sanjiv Bawa sbawa at tabmaster.com
Tue Jan 29 17:18:26 GMT 2002


Here is what the manual says on env vars:


This is clear enough. Once they are there, you can set them pretty easily.

>>%$(envvar)
>>The value of the environment variable envar.


This is where I get confused. How do you do multiple envi variables? Are
they semi colon separated or colon or anything else?

>>source environment (G)
>>This parameter causes Samba to set environment variables as per the
content of the file named.

>>If the value of this parameter starts with a "|" character then Samba will
treat that value as a pipe command to >>open and will set the environment
variables from the output of the pipe.

>>The contents of the file or the output of the pipe should be formatted as
the output of the standard Unix env(1) >>command. This is of the form :

>>Example environment entry:

>>SAMBA_NETBIOS_NAME = myhostname

>>Default: No default value

>>Examples: source environment = |/etc/smb.conf.sh

>>Example: source environment = /usr/local/smb_env_vars



-----Original Message-----
From: samba-admin at lists.samba.org [mailto:samba-admin at lists.samba.org]On
Behalf Of Dwight Tovey
Sent: Tuesday, January 29, 2002 3:37 PM
To: Joel Hammer
Cc: Sanjiv Bawa; samba at lists.samba.org
Subject: Re: [Samba]smb.conf and Environment Variables


On Tue, 2002-01-29 at 13:19, Joel Hammer wrote:
> Please be more specific. What variables are your trying to read and how to
> do plan on using them?
>

I don't know Sanjiv's situation, but I could also use something like
that.  What I have is an Oracle database running on a Unix box.  For
some of the applications, users need to copy files from their PC to the
Unix box where Oracle can get at them, then run an Oracle script to
process those text files.  Users drop these files into $AP_TOP (an
environment variable set by a global setup file) and the scripts use the
same environment variable to find them.  Currently users use FTP to get
the files from their machines to the Unix box, then move them to
$AP_TOP.  I would like to use Samba to make it easier for them.

I could just define the share based on the current value of $AP_TOP, but
occasionally during the course of installing updates or reallocating
filesystems, the Oracle DBA will move the location $AP_TOP.  Currently
he just changes the value of the environment variable setting in the
global file and both users and the Oracle scripts are happy.  If we go
to Samba, then we will have to remember to also change the share
definition as well.  I feel that it would be less error prone if I could
just get Samba to read the same global setup file and just use the
environment variable to set the share path.

	/dwight

--
Dwight N. Tovey                     Unix System Administrator /
Developer
League of American Bicyclists       Idaho Transportation Dept.
     Certified Instructor #750-K-C  3311 W. State St.
Email: dwight at dtovey.net            Boise, ID.  83702
http://www.dtovey.net/dwight        (208)334-8166 / fax: (208)334-8121
---
If you choke a Smurf, what color does it turn?


--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba





More information about the samba mailing list