LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-07-2003, 09:15 AM   #1
snocked
Member
 
Registered: Dec 2002
Location: St. Louis, MO
Distribution: Slackware 9.1
Posts: 482

Rep: Reputation: 30
samba startup at boot


I'd like to know how to run these at boot, and how to start them both manually by executing a simple shell script if I decide to not have them at startup.

Two daemons for samba:
/usr/sbin/nmbd -D
/usr/sbin/smbd -D

I tried placing these commands in /etc/rc.d/rc.local but didn't work. I also tried writing a small shell script to execute manually.

#!/bin/sh
#
/usr/sbin/nmbd -D
/usr/sbin/smbd -D

Didn't work. I then tried adding the absolute path of the shell script to /etc/rc.d/rc.local. Still didn't work. If I type them in manually and check smbclient, I can see the hosts connected.

How would I do this? I'd like to know how to run these at boot, and how to start them both manually by executing a simple shell script if I decide to not have them at startup.

Last edited by snocked; 10-07-2003 at 10:00 AM.
 
Old 10-07-2003, 09:25 AM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
If you go to /etc/rc.d/rc.inet2 there is a section that starts samba, uncomment it.

Didi you get any errors when you ran that script that oy made?
 
Old 10-07-2003, 09:33 AM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Re: samba startup at boot

Quote:
Originally posted by snocked

#!/bin/sh
#
/usr/sbin/nmbd-D
/usr/sbin/smbd-D

Didn't work.
Uh... you need a space before the -D. Also, not sure about the implications of this, but, from the man pages:

"This switch is assumed if smbd is executed on the command line of a shell."

Also, check into:

chkconfig smb on

This turns on Samba service to start automatically in run levels 3, 4, or 5.

Edit: Oh, I just saw your "if I decide to not have them at startup."

Last edited by itsjustme; 10-07-2003 at 09:35 AM.
 
Old 10-07-2003, 09:56 AM   #4
frandalla
Member
 
Registered: Oct 2003
Location: Tokyo - Japan
Distribution: Slackware
Posts: 348
Blog Entries: 1

Rep: Reputation: 37
Re: Re: samba startup at boot

Quote:
Originally posted by itsjustme

Also, check into:

chkconfig smb on

This turns on Samba service to start automatically in run levels 3, 4, or 5.

Edit: Oh, I just saw your "if I decide to not have them at startup."
I'm using slackware and I didn't find this chkconfig... isn't it from another distribution or installed with some particular package?

Answering the original question, slackware has in its /etc/rc.d/ a script called rc.samba (at least Slack 8.1 - 9.1 has it). So, just chmod 755 this script and samba will run at startup. To turn the boot startup off just chmod 644 the script. If your Slackware don't have this script email me at: frandalla at netscape dot net and I'll gladly send you (Although I think you can find it on the net, just google for rc.samba)

Last edited by frandalla; 10-07-2003 at 09:57 AM.
 
Old 10-07-2003, 10:01 AM   #5
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Re: Re: Re: samba startup at boot

Quote:
Originally posted by frandalla
I'm using slackware and I didn't find this chkconfig... isn't it from another distribution or installed with some particular package?
Oh.. yeah, I'm still waking up. That was from my Red Hat 8 Bible.

But the space before the -D still stands.

Edit: Ok, I see the original poster edited his post to show the spaces before the -D's. As long as he did that in the actual script also....

Last edited by itsjustme; 10-07-2003 at 10:04 AM.
 
Old 10-07-2003, 10:03 AM   #6
snocked
Member
 
Registered: Dec 2002
Location: St. Louis, MO
Distribution: Slackware 9.1
Posts: 482

Original Poster
Rep: Reputation: 30
No errors with the script.

Thanks for the /etc/rc.d/rc.inet2 and the /etc/rc.d option.
 
  


Reply



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 Off
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
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
Samba startup on boot. bripage Linux - General 6 07-28-2002 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:35 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration