LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-26-2006, 05:08 PM   #1
Reptile
LQ Newbie
 
Registered: Oct 2006
Location: Bay Area, CA
Distribution: Red Hat ES, Fedora, FreeBSD, Solaris
Posts: 10

Rep: Reputation: 0
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:

/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 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?
 
Old 10-27-2006, 10:40 AM   #2
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

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

So write your scipt then make it executable
Code:
chmod a+x myscript
then add to the proper run-level.
Code:
rc-update add myscript default
 
Old 10-27-2006, 11:53 AM   #3
Reptile
LQ Newbie
 
Registered: Oct 2006
Location: Bay Area, CA
Distribution: Red Hat ES, Fedora, FreeBSD, Solaris
Posts: 10

Original Poster
Rep: Reputation: 0
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?
 
Old 11-03-2006, 06:06 PM   #4
Reptile
LQ Newbie
 
Registered: Oct 2006
Location: Bay Area, CA
Distribution: Red Hat ES, Fedora, FreeBSD, Solaris
Posts: 10

Original Poster
Rep: Reputation: 0
I think I may finally have got it. Have another Gentoo machine to play with, that's not a production server.
 
Old 11-03-2006, 07:23 PM   #5
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
Well I'm glad you got it worked out. I'm not honestly sure what the local.start file is for.
 
  


Reply

Tags
gentoo, samba, winbind



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
Gentoo live cd will not mount /dev/hdc on HP Omnibook xe3 (Gentoo 2006.0.0) tommygoober Linux - Software 3 03-16-2007 06:51 AM
Samba on Gentoo: Network Name Problems big_syner Linux - Networking 4 02-01-2006 03:22 AM
Gentoo, Samba, Webmin and Kwallet ? bigjohn Linux - Software 3 11-26-2005 07:49 AM
gentoo -> windows xp pro samba problems mangolicious Linux - Networking 3 10-03-2004 10:28 AM
Gentoo as gateway, qmail, apache, vsftpd & samba server? jownas Linux - Networking 2 04-21-2003 03:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:43 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