SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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)
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....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.