Operating System - HP-UX
1833767 Members
2789 Online
110063 Solutions
New Discussion

Re: Samba setup under HP-UX

 
Marco Mailand
New Member

Samba setup under HP-UX

Hi all,
I followed the posts regarding Samba and would like to say that samba has to be started with starting of two deamons:
smbd -D
nmbd -D
My questions is where do I do that during startup? Can I include these two commands in a rc-file and if yes in which one?

TIA,
Marco
5 REPLIES 5
Kevin Lamb_2
Frequent Advisor

Re: Samba setup under HP-UX

Hi Marco,

I have currently got my SAMBA starting in /sbin/rc2.d with the following script:

#!/sbin/sh

#
# samba startup: Startup and kill script for SAMBA
#

PATH=/sbin:/usr/sbin:/usr/bin:/opt/samba/bin
export PATH

if [ -r /etc/rc.config.d/samba ]
then . /etc/rc.config.d/samba
fi

case "$1" in

"start_msg") echo "Starting SAMBA Server" ;;

"start") if [ "$RUN_SAMBA" -ne 0 ]
then
startsmb && exit 0
exit 1
fi
exit 2 ;;

"stop_msg") echo "Shutting down the SAMBA Server" ;;

"stop") if [ "$RUN_SAMBA" -ne 0 ]
then
stopsmb
exit 0
fi
stopsmb > /dev/null 2>&1
exit 2 ;;

esac

exit 0;

This is the script which is in /sbin/init.d and then linked to S900samba in /sbin/rc2.d

Hope this helps

Kev
"I'd rather be flying"
I'd Rather be Flying!!!
Rainer von Bongartz
Honored Contributor

Re: Samba setup under HP-UX

put this in /sbin/init.d/samba

#!/sbin/sh

#
# samba startup: Startup and kill script for SAMBA
#

PATH=/sbin:/usr/sbin:/usr/bin:/opt/samba/bin
export PATH

if [ -r /etc/rc.config.d/samba ]
then . /etc/rc.config.d/samba
fi

case "$1" in

"start_msg") echo "Starting SAMBA Server" ;;

"start") if [ "$RUN_SAMBA" -ne 0 ]
then
startsmb && exit 0
exit 1
fi
exit 2 ;;

"stop_msg") echo "Shutting down the SAMBA Server" ;;

"stop") if [ "$RUN_SAMBA" -ne 0 ]
then
stopsmb
exit 0
fi
stopsmb > /dev/null 2>&1
exit 2 ;;

esac

exit 0;


and create this links

lrwxr-xr-x 1 root sys 18 Nov 4 2002 K130samba -> /sbin/init.d/samba
lrwxr-xr-x 1 root sys 18 Mar 24 10:03 S900samba -> /sbin/init.d/samba


Regards
Raine
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Rainer von Bongartz
Honored Contributor

Re: Samba setup under HP-UX

and...


create a file /etc/rc.config.d/samba

and put

RUN_SAMBA=1

into it


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Fragon
Trusted Contributor

Re: Samba setup under HP-UX

By default,Samba in HP-UX is called CIFS Server(Client). If you want to enable the samba daemons when startup , just set the file /etc/rc.config.d/samba, keep "RUN_SAMBA=1"!
You can also manually run it by:
#/opt/samba/bin/stopsmb
#/opt/samba/bin/startsmb

-ux
Caesar_3
Esteemed Contributor

Re: Samba setup under HP-UX

Hello!

The package of samba came with startup scripts
for the deamons so check in the directory that
you install for the scripts of start/stop smb

Caesar