View previous topic :: View next topic |
Author |
Message |
carlos123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/picard1.jpg)
Joined: 12 Feb 2003 Posts: 536 Location: Alberta, Canada.
|
Posted: Sun Mar 23, 2003 4:30 am Post subject: After successful emerge, samba service won't start? |
|
|
I successfully emerged samba but now I can't get it to run.
Here is a copy of a recent attempt to get it to work....
Code: |
pine [~] # ps -C samba
PID TTY TIME CMD
pine [~] # /etc/init.d/samba zap
pine [~] # /etc/init.d/samba start
* Starting samba... [ !! ]
pine [~] # ps -C samba
PID TTY TIME CMD
pine [~] # smbstatus
Samba version 2.2.7a
Service uid gid pid machine
----------------------------------------------
Failed to open byte range locking database
ERROR: Failed to initialise locking database
Can't initialise locking module - exiting
pine [~] # smbmount //pine/c /mnt/temp -o username=carlos
14425: session request to PINE failed (Not listening on called name)
14425: session request to *SMBSERVER failed (Called name not present)
SMB connection failed
pine [~] # ping pine
PING pine (192.168.1.101): 56 octets data
64 octets from 192.168.1.101: icmp_seq=0 ttl=128 time=0.5 ms
64 octets from 192.168.1.101: icmp_seq=1 ttl=128 time=0.7 ms
64 octets from 192.168.1.101: icmp_seq=2 ttl=128 time=0.7 ms
64 octets from 192.168.1.101: icmp_seq=3 ttl=128 time=0.5 ms
--- pine ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.5/0.6/0.7 ms
pine [~] #
|
Any suggestions as to how to get it started would be appreciated.
Thanks.
Carlos _________________ I'm not yet a real Guru so if you are a newbie here and want to teach me a thing or two, please do! I'm still learning just like you. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rojaro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 06 May 2002 Posts: 732
|
Posted: Sun Mar 23, 2003 4:41 pm Post subject: |
|
|
first, the samba deamons are not named "samba" therefore a "ps -C samba" wont show anything at all. their correct names are "smbd" and "nmbd".
second, check your /var/log/syslog for errormessages
third, read the docs at www.samba.org.
i assume you're trying to mount a windows box, but then your mount command is probably not correct. to do this you don't need samba installed if you configure your linux kernel to support smbfs. to mount a windows system share (like C$) with the smbmount command you got use the following syntax:
smbmount //pine/c\$ /mnt/temp -o username=carlos,workgroup=DOMAIN
where DOMAIN is your workgroup or domain name. in order to do the same with the facilities provided by the linuxkernel (through smbfs support) you can use the following command:
mount -t smbfs -o username=carlos,workgroup=DOMAIN //pine/c\$ /mnt/temp
it's also a good idea to add the following options:
gid=winmount - specify a group of users that owns the file system. e.g. create a group like "winmount" and add to this group every user that should have access to the file system.
fmask=0660 - if you want to be able to modify files on that filesystem and also have no executables (as there are usually no linux binaries on a windows share)
dmask=2770 - set sgid for the owning group, this assures that every user in the owning group can read and write to every directory (regardless of who created the directory)
nodev - windows shares cant have devices.
so the final mount command would look like this:
mount -t smbfs -o username=carlos,workgroup=DOMAIN,gid=winmount,fmask=0660,dmask=2770,nodev //pine/c\$ /mnt/temp
but i strongly advice you to read the documentation of the mount command and samba.
have fun _________________ A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
carlos123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/picard1.jpg)
Joined: 12 Feb 2003 Posts: 536 Location: Alberta, Canada.
|
Posted: Mon Mar 24, 2003 1:40 am Post subject: |
|
|
Thanks very much rojaro!
I will certainly re-read the samba documentation for the nth time and the mount manpage for the nth time as well.
I was confused not so much in how to use Samba (based on the examples I was reading in various places) but rather over the nature of the messages that I was seeing returned by samba related programs that I had never seen before when running samba under Redhat. The messages (under Gentoo) seemed to indicate that samba wasn't even running.
Thanks for clarifying the names of the samba server daemon programs (smbd and nmbd). What is still confusing though is the fact that Gentoo seems to start|stop|restart| and zap the samba service through the name "samba".
As shown below...
Code: |
pine [~] # ps -C smbd
PID TTY TIME CMD
14070 ? 00:00:00 smbd
pine [~] # ps -C nmbd
PID TTY TIME CMD
14072 ? 00:00:00 nmbd
pine [~] # /etc/init.d/samba status
* status: stopped
pine [~] # /etc/init.d/smbd status
-bash: /etc/init.d/smbd: No such file or directory
pine [~] # /etc/init.d/nmbd status
-bash: /etc/init.d/nmbd: No such file or directory
pine [~] #
|
Why does "/etc/init.d/samba status" return "stopped" when both the nmbd and smbd services appear to be running processes (if they are in reality "samba")? And why does Gentoo call the samba service samba if in fact the names of the samba daemon is really two different daemons (smbd and nmbd)?
Any further insight that would clarify this confusion for me would be most appreciated.
Thanks.
Carlos |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Kulfaangaren! Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 11 Jan 2003 Posts: 176 Location: Borås, Sweden
|
Posted: Mon Mar 24, 2003 3:46 am Post subject: Re: Trouble with samba |
|
|
Hello Carlos123
The reason for the name of the start script /etc/init.d/samba is that Samba is the name of the whole service, smbd and nmbd are your two parts of the whole service even if they are very important parts of it.
If I understand it correctly, smbd is the daemon that shares directories and printers and nmbd is a WINS workalike, both are very important and the service Samba would not work without either of them.
As to why the start script doesn't work on your machine, I'm unfortunately not quallified to even guess a reason
You could check /var/run/samba/*.pid (they should contain only the PIDs of the two daemons) and compare the numbers to the PIDs of the smbd & nmbd. If they differ then something is really wrong, status most likely checks for those two files and gets thier contents and checks that the PID contained in smbd.pid really is the PID of a started smbd daemon and the same for nmbd.
// Fredrik |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
carlos123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/picard1.jpg)
Joined: 12 Feb 2003 Posts: 536 Location: Alberta, Canada.
|
Posted: Mon Mar 24, 2003 11:38 am Post subject: |
|
|
Thanks for your further reply Fredik. The PID's in /var/run/samba correspond exactly to the running smbd and nmbd processes.
I will play around it with it some more along with comparing the difference between my Redhat samba install and the Gentoo one to see if I can get the Gentoo one to start up and work as well as it does under Redhat.
I still find it confusing though. Especially when it comes to understanding how something like Samba is supposed to work, under Gentoo. It would be less confusing if in addition to learning how to work with Samba from it's own documentation I did not have to also learn the quirks of running it under Gentoo.
For example I never heard of /var/run/samba or even known about this directory. To be sure it might be a common thing when using Samba to have the *.PID files end up there but if not it's another of those little quirks that one must discover when running Gentoo.
Anyway I will play with it some more.
Thanks again.
Carlos |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Kulfaangaren! Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 11 Jan 2003 Posts: 176 Location: Borås, Sweden
|
Posted: Mon Mar 24, 2003 1:53 pm Post subject: Re: Trouble with Samba... |
|
|
From what I can see in my startup script it seems /var/run/samba is something that they most likely defined in the ebuild and gets compiled into Samba since they do not specify the location or name of the pidfile when they start smbd & nmbd but they use it when they stop it.
If you read the startup scripts you can learn lots of nice things including the existance of the /var/run/samba dir even though /var/run/ is pretty standard for .PID files under linux....the first thing I learned was that I do not know half of what I *need* to know to understand Gentoos startscript and how they work with dependencies and all
// Fredrik |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|