LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Samba startup on boot. (https://www.linuxquestions.org/questions/linux-general-1/samba-startup-on-boot-26604/)

bripage 07-26-2002 01:13 PM

Samba startup on boot.
 
I dont think that this question has been asked in a while,so here goes.

Ive been trying to get the samba daemon to startup when linux loads, but I havent been able to get it to work correctly. I have tried adding an if statement to rc.inet2 :

#Starting Samba daemon.
if [-x /etc/samba/smb.conf]; then
echo "Starting Samba daemon /etc/samba/smb.conf./
.[/etc/samba/smb.conf]
else
echo "WARNING - /etc/samba/smb.conf not found."
fi
#Done startinf the samba daemon.


The only problem is that when I restart to see if it works, I get my "WARNING" message. I dont know what up with this thing! One thing I do notice however ( Idont know if its part of the problem) is that right before the "WARNING" message on the kernal bootup screen, I see a message which says:

/etc/rc.d/rc.M: [: missing ']'

I dont know wether this is involved in the prob or what. Im hoping someone will help me in this.

Mara 07-26-2002 01:24 PM

Try to add free space " " after smb.conf and before ']'.

bripage 07-26-2002 01:39 PM

well... Imade it look like this:

#Starting Samba daemon.
if [ -x /etc/samba/smb.conf ]; then
echo "Starting Samba daemon /etc/samba/smb.conf./
/etc/samba/smb.conf
else
echo "WARNING - /etc/samba/smb.conf not found."
fi
#Done startinf the samba daemon.

but now its still saying that the files mising.

Mara 07-27-2002 05:15 AM

In my system smb.conf is in /etc, not in /etc/samba. Maybe try to use /etc/smb.conf instead of /etc/samba/smb.conf .

Rashkae 07-27-2002 04:13 PM

-x tests if the file is executable. Since smb.conf is most certainly not executable, that's why the test fails. Try -e instead (to test if the file exists).

For that matter, I don't know why you are using the if structure at all. Patrick uses them in the default scripts because there is no easier way to check if the packages are installed or not. Since you know that Samba is installed and you want it to start, why bother?

bripage 07-28-2002 05:33 PM

so then how do I start it on startup!?!?

Rashkae 07-28-2002 10:00 PM

/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D

You shoud really download the source Tarbal of Samba for the documentation, if nothing else.

Installation instructions are very clear and detailed.

Note: Your smbd and nmbd executables will be somewhere else if you've installed from package.


Also, in Slackware, you have to comment out the entries for smbd and nmbd from the /etc/inetd.conf, unless, of course, you want to start Samba from inetd. Again, refer to the Samba docs.


All times are GMT -5. The time now is 04:41 PM.