Options

Gentoo and Samba

We've got a weird situation at my work, and I thought I'd ask the other 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:

/etc/init.d/samba stop
/etc/init.d/winbind restart
/etc/init.d/samba start

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. 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?

Free Microsoft Training: Microsoft Learn
Free PowerShell Resources: Top PowerShell Blogs
Free DevOps/Azure Resources: Visual Studio Dev Essentials

Let it never be said that I didn't do the very least I could do.

Comments

  • Options
    remyforbes777remyforbes777 Member Posts: 499
    I know on debian the runlevel determines what services start and in what order. In /etc/rc.d/rc2.d, and each service is number and has K for kill or S for start. The number determines what order the services start.
  • Options
    mgmguy1mgmguy1 Member Posts: 485 ■■■■□□□□□□
    I would post this question on Gentoo.org forums. I am useing Sabayon Linux and it is Gentoo based. Eveything that the Sabayon fourms do not cover. Gentoo.org fourms do. I would check there.
    "A lot of fellows nowadays have a B.A., M.D., or Ph.D. Unfortunately, they don't have a J.O.B."

    Fats Domino
  • Options
    TeslTesl Member Posts: 87 ■■■□□□□□□□
    I can't help but feel that I'm a little late in answering this question, but with Gentoo you should be using rc-update for the bootup sequence. You can then say:

    rc-update add default samba
    rc-update add default winbind

    This will start them both by default on bootup. However, you need to add the dependancy that Winbind should start first, and you may have to add a line to the /etc/init.d/samba file in the depends {} bit (I forget the syntax, something like "dep winbind")

    That should make sure that Winbind always starts first.

    I'm sure you already solved this problem by now, but thought I'd answer anyway in case someone else comes across this thread who needs to know :]
  • Options
    SlowhandSlowhand Mod Posts: 5,161 Mod
    Thanks for the reply, Tesl. I'm always appreciative of any help I can get. And yes, I'd implemented a solution shortly after asking the original question, but I decided to go back and try out your suggestion, and I'm finding that it seems to be a much, much cleaner way of getting the job done. Thanks for the help, I'm sure I'll be looking for your posts on future Linux screams for help. . . err. . . "questions" I post on TechExams.

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • Options
    TeslTesl Member Posts: 87 ■■■□□□□□□□
    Slowhand wrote:
    Thanks for the reply, Tesl. I'm always appreciative of any help I can get. And yes, I'd implemented a solution shortly after asking the original question, but I decided to go back and try out your suggestion, and I'm finding that it seems to be a much, much cleaner way of getting the job done. Thanks for the help, I'm sure I'll be looking for your posts on future Linux screams for help. . . err. . . "questions" I post on TechExams.

    No problem at all, I`m glad I could help out.
Sign In or Register to comment.