Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


I couldn't start Samba.

Posted on 2000-03-12
Medium Priority
Last Modified: 2013-12-15
In Red Hat Linux 6.0, I uninstalled and reinstalled Samba(.rpm) from Red Hat CD.
I checked /etc/services file and modified /etc/inetd.conf and even rebooted my system. In /etc/rc.d/init.d directory I ran command "./smb start"
and smbd daemon is not there when I use "ps" command to check. issue command "./smb stop" it says Shutting down SMB service: [Failed]. Can somebody help?

Question by:aicc
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 2609748
check if you have /etc/smb.conf in palce. or try out at commandline rpokmpt the real startup line from /etc/rc.d/init.d/smb, and see what you get.

Author Comment

ID: 2609798
The /etc/smb.conf is in place. I don't know what "rpokmpt" means. I ran command "/usr/sbin/smbd -D". I still can not see the daemon.


Expert Comment

ID: 2609850
Check out the /var/log/samba directory. There are the log files, one of them might tell you what's wrong.

Also check out /var/log/messages right after starting Samba. The error might be there too.
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 40

Expert Comment

ID: 2609866
What did you change in inetd.conf? Samba runs better as a full time daemons and you don't want to be starting smbd or nmbd from inetd. If you did allow inetd to manage smbd & nmbd, you won't "see them running" until a windows client tries to use a Samba service and they'll disappear as soon as the client closes the connection. Furthermore, if the services are registered with inetd, the ports are owned by inetd and you can't just run smbd & nmbd.

If it doesn't start when you use "/usr/sbin/smbd -D" and you don't have inetd managing smbd & nmbd, then the likely cause is that something is wrong with the smb.conf file or it's not in the right place. Check your samba logs, there'll probably be something there that will provide a clue as to what the problem is.

Author Comment

ID: 2610061
Thank you guys!
in /var/log/samba/smb.log file, I read Lib/util_sock.c:open_socket_in(671) bind failed on port 139 socket_addr= (address already in use)

when I reboot the machine,
in /var/log/messages file I read:
inetd[357]: netbios/udp server failing (looping), service terminated.

I don't know how to fix it. Please help!

what I did on inetd.conf file was:
uncomment the swat line,
add line "netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd" and "netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd"
LVL 40

Expert Comment

ID: 2610121
Go into /etc/inetd.conf and remove the lines:

netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd

Then do "ps -ef | grep inetd | grep -v grep". That'll give you the process info for inetd. Using the process ID to replace nnn below (first number from the left), issue the command "kill -HUP nnn". That'll cause inetd to reread its config file and it'll quit trying to manage the netbios ports (137 & 139).

You should then be able to start smbd & nmbd from the command line. Oh yeah, leave the swat line alone, it's okay for it to be there.

Author Comment

ID: 2610351
thanks. you are the man.
but I still can not see the shared directory(Linux share). on a win98, I can see the Linux server icon but can't access it. right click on the icon and select properies, it says "the server \\bach (linux) does not accept remote requests.

on Linux side:
guest account  nobody
share is bill
shared directory is   /home/bill
guest ok = Yes
host allow   is empty.

What I missed.

LVL 40

Expert Comment

ID: 2610432
Okay, we're making progress... At least Samba runs now...

Lets try this for a start. Shut Samba down (/etc/rc.d/init.d/smb stop), save your existing config file (mv /etc/smb.conf /etc/smb.conf-save), then paste what's below into a new /etc/smb.conf file. It's a really basic Samba config that I'm pretty sure will work.

You do need to be sure that /etc/smbpasswd exists and that your windows login name and password are the same as your linux logon name and password. Don't use a mixed case username as windows won't preserve case when authenticating against the Samba server. If you don't have the smbpasswd file create it with, surpisingly, "smbpasswd -a username". There is a way around having to use encrypted passwords, but unless you are into windows registry hacks...

Now run "testparm" to be sure that the config is okay, and then re-start Samba.
You should see the server in network neighborhood and there should be a share labeled with your username. Once you've got basic stuff working you can get as fancy as you like with the smb.conf file (modifying your saved smb.conf file and letting Samba use that).

---snip, snip---
    workgroup = compcntr
    server string = Linux Samba
    printcap name = /etc/printcap
    load printers = yes
    debug level = 0
    log file = /var/log/samba/log.%m
    max log size = 50
    security = user
    encrypt passwords = yes
    smb passwd file = /etc/smbpasswd
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    os level = 0
    comment = Home Directories
    browseable = no
    writable = yes
    comment = All Printers
    path = /var/spool/samba
    browseable = no
    guest ok = no
    writable = no
    printable = yes
LVL 40

Expert Comment

ID: 2610434
Rat's, I hit submit too soon... Change the workgroup name to what you've already set as the workgroup in windows.

Author Comment

ID: 2610543
Adjusted points to 40

Author Comment

ID: 2610544
Mr. jlevie:
Wonderful! You are the real man!!
I think what i missed was the password part. maybe the socket option is also important.

Thank you again.

LVL 40

Expert Comment

ID: 2610580
The encrypted passwords are important, bu I think it was the empty "hosts allow" that was your first problem. If it had just been the passwords, you'd have gotten an "access denied" rather than the "not accepting requests". However, I was pretty sure that you were unlikely to have known to enable ecrypted passwords, so I wanted to short-circuit the intial "get it working" and reduce the frustration by using a "known good" config.

The socket option is just a good idea that rather dramatically improves file transfers between the systems, again it's one of those things that are documented but aren't exactly general knowledge.
LVL 40

Accepted Solution

jlevie earned 160 total points
ID: 2619814
If everything is working ok now, it would be appreciated if you'd select a comment you like as the answer and grade it.

Author Comment

ID: 2620235
Sorry This is my first time to use this side. I didn't know about the acceptable answer. Thank you for telling me this.



Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question