LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-13-2011, 09:19 PM   #1
tailinlinux
Member
 
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Blog Entries: 3

Rep: Reputation: 25
Do anyone knows how to autorun samba when pc start up?


I have a linux machine and i have a printer shared on it.When i reboot the computer shared printer is missing when im connecting again using windows machine, so i need to run command in terminal [CODE]samba restart[/CODE.
after running this command shared printer(SMB) is visible.

Thank in advance please help.

Aries
 
Old 12-13-2011, 11:37 PM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
You dont say what distribution you are using, but your profile box says Mandriva, and a quick google suggests to me that Mandriva uses the same init method as CentOS, ie: chkconfig

So to answer your thread title..
Code:
# chkconfig samba on
should do it.

I would imagine that the problem is that samba isn't starting on reboot. But when you restart samba, you would likely be getting a [Fail] on stopping it, since it isn't already running.
 
Old 12-13-2011, 11:55 PM   #3
coolsg5636
Member
 
Registered: Sep 2011
Location: Pune,India
Distribution: RHEL ,CentOS, Fedora
Posts: 100

Rep: Reputation: 25
If you have "ntsysv" tool installed then you can manage all the services at the same time. You can decide which service should start after boot and which service shouldn't.

Command is ,

# ntsysv
 
Old 12-14-2011, 01:52 AM   #4
tailinlinux
Member
 
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Blog Entries: 3

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by fukawi1 View Post
You dont say what distribution you are using, but your profile box says Mandriva, and a quick google suggests to me that Mandriva uses the same init method as CentOS, ie: chkconfig

So to answer your thread title..
Code:
# chkconfig samba on
should do it.

I would imagine that the problem is that samba isn't starting on reboot. But when you restart samba, you would likely be getting a [Fail] on stopping it, since it isn't already running.
Yes your right im using mandriva.. still problem occurred when i turn off my pc and power on it again.
 
Old 12-14-2011, 06:31 AM   #5
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
OP, you didn't say what happened when you ran
Code:
chkconfig samba on
? If Mandriva is like RHEL based distros, then you likely got an error. Did you?
Under RHEL it will be
Code:
chkconfig smb on
Also, take a look at your /var/log/messages to see if you are getting startup errors for samba during startup. (or it might be /var/log/samba/smb.log)

Last edited by zQUEz; 12-14-2011 at 06:35 AM.
 
Old 12-15-2011, 04:29 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Hello,

Please run the following script manually and check for error messages:

# /etc/rc.d/init.d/smb stop

(to make sure it's not running)
# /etc/rc.d/init.d/smb start

If it does not start up, check the logs, specifically /var/log/syslog and
/var/log/samba/logsmbd and /var/log/samba/log.nmbd. If you do not see much
there , increase the logging level by putting:
log level = 3
(or even higher)in the global section of /etc/smb.conf

Once you have got the script starting manually, you should manipulate the
start-up scripts with chkconfig (rather than making the links yourself). One
possible problem is that the script checks to see if networking is up,
otherwise it exits. If you have got smb starting before network, then this
could be your problem. If you use chkconfig it will get the order correct.

# chkconfig smb on
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Start a Ubuntu 5.10 without GUI + autorun rdesktop Truemale Ubuntu 9 03-27-2011 09:34 PM
samba refuses to start on startup, but will start manually pepsimachine15 Linux - Software 8 04-20-2009 12:03 PM
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 02:59 PM
HOWTO autorun a program on start up? kodaku Linux - Software 6 08-12-2004 10:40 PM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 06:54 AM


All times are GMT -5. The time now is 02:07 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration