Solved

I couldn't start Samba.

Posted on 2000-03-12
14
308 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
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.
0
 

Author Comment

by:aicc
ID: 2609798
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
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.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 40

Expert Comment

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

Author Comment

by:aicc
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=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
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.
0
 

Author Comment

by:aicc
ID: 2610351
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
 
LVL 40

Expert Comment

by:jlevie
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---
[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
ID: 2610434
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
ID: 2610543
Adjusted points to 40
0
 

Author Comment

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

Bill
0
 
LVL 40

Expert Comment

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

Accepted Solution

by:
jlevie earned 40 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.
0
 

Author Comment

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

Bill

0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS CLI - Issue with name display 2 73
Choosing CentOS 16 82
looking for a CENTOS ISO to download with x window installed 2 39
CENTOS DHCP Server / PXE/TFTP 14 80
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

803 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