Solved

I couldn't start Samba.

Posted on 2000-03-12
14
304 Views
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?

Bill
0
Comment
Question by:aicc
14 Comments
 
LVL 3

Expert Comment

by:jyu_88
Comment Utility
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.
0
 

Author Comment

by:aicc
Comment Utility
jyu_88:
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.

Bill
0
 
LVL 4

Expert Comment

by:feenix
Comment Utility
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.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 

Author Comment

by:aicc
Comment Utility
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=0.0.0.0 (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"
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 

Author Comment

by:aicc
Comment Utility
jlevie:
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.

Bill
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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---
[global]
    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
[homes]
    comment = Home Directories
    browseable = no
    writable = yes
[printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = no
    guest ok = no
    writable = no
    printable = yes
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Rat's, I hit submit too soon... Change the workgroup name to what you've already set as the workgroup in windows.
0
 

Author Comment

by:aicc
Comment Utility
Adjusted points to 40
0
 

Author Comment

by:aicc
Comment Utility
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.

Bill
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 40 total points
Comment Utility
If everything is working ok now, it would be appreciated if you'd select a comment you like as the answer and grade it.
0
 

Author Comment

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

Bill

0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now