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

Sanjiv Bawa sbawa at tabmaster.com
Thu Jan 31 12:09:06 GMT 2002


I did this. I set the Environment variables in /etc/init.d/smb script.

I then changed the domain to

DOMAIN = %$DOMAIN

and restarted the server.
The domain showed up as %$DOMAIN and not the value of the variable.

What next?

Thanks for helping.


-----Original Message-----
From: samba-admin at lists.samba.org [mailto:samba-admin at lists.samba.org]On
Behalf Of Christian Barth
Sent: Wednesday, January 30, 2002 2:29 AM
To: Joel Hammer; Dwight Tovey
Cc: Sanjiv Bawa; samba at lists.samba.org
Subject: [Samba] Re: [Samba]smb.conf and Environment Variables


> 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.

What about a hack like this:
Modify your samba startup script (/etc/init.d/samba or what ever)
to do some thing like:

  echo "
  ....
  ....
  [Oracel Data]
    path=$AP_TOP
    readonly = no
  ....
  .... " > /usr/local/samba/lib/smb.conf
  nmbd -D
  smbd -D

OK,
you have to restart samba for this to be effectiv. But if you include 
the samba startup into the oracel startup you should be happy. (Or 
does oracel not have to be restarted after updates and filesystem 
relocations?)

Christian

               _(_)_                          wWWWw   _
   @@@@       (_)@(_)   vVVVv     _     @@@@  (___) _(_)_
  @@()@@ wWWWw  (_)\    (___)   _(_)_  @@()@@   Y  (_)@(_)
   @@@@  (___)     `|/    Y    (_)@(_)  @@@@   \|/   (_)\
    /      Y       \|    \|/    /(_)    \|      |/      |
 \ |     \ |/       | / \ | /  \|/       |/    \|      \|/
jgs|//   \\|///  \\\|//\\\|/// \|///  \\\|//  \\|//  \\\|// 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

-- 
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