| ProTIPS | Misc |
Setting up CIFS/Samba on HP-Unix |
For HP-UX 10.20 I downloaded Samba from the HP Unix Porting Archive ( http://hpux.connect.org.uk/ ). After renaming the file to restore the ".gz" extension, and then using gunzip to unzip the ".depot" file, I was able to install in the usual way "swinstall -s ...".
I then referred to the Samba-HOWTO-Collection.html which is included in the "swat/help" folder of the HP-UX install, but also on the web at http://samba.mirror.ac.uk/samba/docs/man/Samba-HOWTO-Collection.html . I also referred to the O'Reilly ( http://www.oreilly.com/ ) "Using Samba" documentation which was also included in the "swat/using_samba" folder of the HP-UX install.
As the binaries were already compiled I was able to go straight to the step where you create the smb.conf configuration file.
According to the man page for smbd the "smb.conf" file should be located at "<samba_loadpoint>/lib/smb.conf". I found it located at "/etc/opt/samba/smb.conf".
Starting from the example smb.conf file, I added the line " encrypt passwords = yes " as described in "Using Samba":
Starting up the smbd and nmbd daemons manually, the "Simple" workgroup appeared in Windows NT as a domain next to our existing domain, so I changed the workgroup to the same as our existing domain and then the server appeared in the local network neighbourhood.
To configure Samba to start up and shut down automatically
with the server, I created a script called startsmb which I put in a folder
called startup in the samba loadpoint. The script is as follows:
| #!/sbin/sh
mode=$1 case $mode in 'start_msg')esacecho "Start Samba Server"'stop_msg') exit 0 |
I set the script to have execute permissions and tested this script by issuing the commands "./startsmb -start" and "./startsmb -stop".
I then copied this to /sbin/rc2.d as S999startsmb, using the following command:
cp -p startsmb /sbin/rc2.d/S999startsmbThis will make Samba shutdown and startup correctly, with the server.
Simon Toon, November 9th 2002 - January 14th 2006