Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Distribution: Red Hat ES, Fedora, FreeBSD, Solaris
Posts: 10
Rep:
Gentoo and Samba
We've got a weird situation at my work, and I thought I'd ask the Linux gurus for some advice. We're running Samba on a particular server, but it's being a little quirky. For some odd reason, when the Samba daemon(s) start, they insist on starting before the winbind daemon, and that causes issues. So, the only course of action is to perform something like the following:
For some odd reason, when winbind starts first, then samba, everything works fine. That, however, isn't the real problem. My issue is with the OS, itself. We're running Gentoo, and I'm not 100% sure of where I could place the commands in order for them to run on startup. I believe it's /etc/conf.d/local.start, but there is no way for me to test the machine since I'm not able to reboot. (It's a production server, running some data backup programs, and won't be able to be rebooted for quite some time.)
The reason I want to automate these commands is that, a year from now when we may have to reboot the machine for one reason or another, no one is going to remember that samba and winbind won't play nice together on this particular. I'd like to ensure that if we have to reboot, everything will come back up just the way it's supposed to be. Anyone out there a Gentoo expert, or able to double-check my work so that I'll be sure I haven't gone off in the wrong direction?
You could write the necessary commands you need as a bash script, make it executable and then add it to a specific run level. Or you could tell cron to run it every so often if necessary.
Distribution: Red Hat ES, Fedora, FreeBSD, Solaris
Posts: 10
Original Poster
Rep:
Thanks for the reply. Writing to a bash script might not be a bad idea, but I don't think setting it up as a cron job would work since I need the commands to be run only on startup. In your opinion, will my temporary solution above work until I can get back to the machine and write the script, or am I completely wrong?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.