samba.unc script

Forum: DSL Tips and Tricks
Topic: samba.unc script
started by: jpeters

Posted by jpeters on Jan. 03 2008,05:18
This script installs samba.unc (if not already installed), copies over your password and smb.conf file, and starts, stops, or restarts the samba service.  Edit the paths to samba.unc, smbpasswd, and smb.config.  Runs with args: start, stop, or restart (eg. "samba start")  note: check manual for setting up password and config file.


if [ ! -f /usr/sbin/nmbd ]; then
mydsl-load /mnt/hda3/Downloads/samba.unc
sudo cp /mnt/hda3/MyFiles/scripts/samba/smb.conf /etc/samba/
sudo cp /mnt/hda3/MyFiles/scripts/samba/smbpasswd /usr/bin/

case $1 in
start )  sudo /usr/sbin/nmbd start | sudo /usr/sbin/smbd start ;;
restart )  sudo /usr/sbin/nmbd restart | sudo /usr/sbin/smbd restart ;;
stop ) sudo killall -TERM nmbd | sudo killall -TERM smbd ;;
* ) echo "args: start, stop, restart" ;;

Posted by jpeters on Jan. 06 2008,19:43
I edited the [ ! /opt/samba ] after finding this directory loads without samba.unc installed.  /usr/sbin/nmbd installs after samba.unc loads.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.