Configuring Samba Share
For Windows provisioning, to share a data store that resides on a Red Hat Linux server, use the following procedure:
- Create the data store directory. For example, this procedure uses the following data store directory path name: /opt/bladelogic/pxestore
- Install Samba and httpd on the data store server.
Use the package manager (yum install samba httpd) or install the necessary RPMs and their dependencies directly.
To verify that Samba is installed, use the following command: smbd -V
The command returns a version number if Samba is installed. - Configure the Samba and httpd services to start on boot up:
chkconfig smb on
chkconfig httpd on - Create a Samba share user to map to the data store. Use the following commands:
useradd blprov
smbpasswd -a blprov
Then specify the SMB password for this user. - In the BMC Server Automation Console, map this user and password to the data store property instance that you are going to use to provision your Windows systems.
- For Apache servers, configure the symbolic link to the data store:
- Enter the following command:
ln -s <data_store_path> /var/www/html/data_store_name
For example,
ln -s /opt/bladelogic/pxestore /var/www/html/pxestore
- Enter the following command:
- In the /etc/httpd/conf/httpd.conf file, ensure that the section <Directory "/var/www/html">
includes the following line:
Options Indexes FollowSymLinks - Open the smb.conf file. Locations vary depending on your Samba distribution. For Red Hat Linux distributions, the file is in /etc/samba.
Add lines to the file to define the path to the data store directory and define users and access. The following example shows a minimal smb.conf file containing the lines required to enable a data store share.
# Creates a publicly accessible directory with read only access.
#The last line provides write access to people in the "staff" group
[pxestore]
comment = PXE
#The path is the example we created above.
path = /opt/bladelogic/pxestore
public = yes
writable = no
#The valid user is the example we created above.
valid users = blprov
# printable = no
# write list = +staff- Save the smb.conf file.
- If the Red Hat Linux server has a host-based firewall, configure the firewall to allow the following port and protocol combinations for both Samba and httpd:
- Start or restart Samba and httpd, using the following commands:
service smb start
service httpd start - Map the Linux data store directory as a network drive on a Windows server. For example, map //Server1/pxestore, using the blprov user for credentials.
For more information about configuring Samba, see http://samba.netfirms.com/index.htm or http://www.samba.org/samba/docs/.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*