LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-26-2002, 01:13 PM   #1
bripage
Member
 
Registered: Jan 2002
Location: Moorpark
Distribution: SLACK 8!
Posts: 230

Rep: Reputation: 30
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.
 
Old 07-26-2002, 01:24 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
Try to add free space " " after smb.conf and before ']'.
 
Old 07-26-2002, 01:39 PM   #3
bripage
Member
 
Registered: Jan 2002
Location: Moorpark
Distribution: SLACK 8!
Posts: 230

Original Poster
Rep: Reputation: 30
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.

Last edited by bripage; 07-26-2002 at 01:40 PM.
 
Old 07-27-2002, 05:15 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
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 .
 
Old 07-27-2002, 04:13 PM   #5
Rashkae
Member
 
Registered: May 2002
Distribution: Slackware
Posts: 125

Rep: Reputation: 15
-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?
 
Old 07-28-2002, 05:33 PM   #6
bripage
Member
 
Registered: Jan 2002
Location: Moorpark
Distribution: SLACK 8!
Posts: 230

Original Poster
Rep: Reputation: 30
so then how do I start it on startup!?!?
 
Old 07-28-2002, 10:00 PM   #7
Rashkae
Member
 
Registered: May 2002
Distribution: Slackware
Posts: 125

Rep: Reputation: 15
/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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
startup and samba nick021 Linux - Newbie 3 04-17-2005 02:30 PM
Automatic startup SAMBA during boot mnoorman Linux - Networking 2 05-22-2004 08:59 AM
Samba at startup t3___ Linux - Newbie 6 05-22-2004 02:14 AM
samba startup at boot snocked Slackware 5 10-07-2003 10:03 AM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM


All times are GMT -5. The time now is 04:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration