Click to See Complete Forum and Search --> : Samba server help


Floppyman
09-07-2003, 04:34 PM
Hi all,

I'm trying to get my Samba server back up and running. I had it all working before, but now for some reason it won't. I saved my working smb.conf file from last time and just used this time as well. One weird thing is that neither the smbpasswd or smbclient commands will not work. I get bash: command not found error.

Also the samba server is hooked into a router now and gets an IP of the form 192.168.1.x The windows client is hooked into the router as well and gets an IP of the same form. The router acts a DHCP server and has the IP 192.168.1.50. Now when I try to connect to the shares on the Samba server from the win2k machine I get the "network path not found error".

I have added lines to my rc.local to start the service:

/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D

but I'm not quite sure whether it is being started correctly or at all. In the nmbd.log and smbd.log files there are entries that talk about a response packet being received with no matching record. However when using the netstat command, smbd appears to be listening.

Any ideas what it could possibly be? Like I mentioned, this worked before with the smb.conf file I'm currently using. Do I need to open any ports on the router? Might I be forgetting something on the windows client? Thanks in Advance.

Floppyman
09-07-2003, 04:38 PM
Update:

Ok I was not seeing this correctly. The server is now being identified as Localhost instead of name it was last time. In the smb.conf file I gave it the name it was before. Is there anyway I can change this? TIA.

Floppyman
09-07-2003, 04:57 PM
Also, now I'm having some permissions trouble again. When I try use the smbpasswd command I get a command not found error. I changed the permissions on the shares already but it still prompting me for a password in windows, and no matter what I enter it won't work. Thanks again. I really appreciate the help.

Floppyman
09-07-2003, 10:37 PM
Ok I got everything working.

What I still don't understand is why I can't use the smbpasswd command. I need to use it to setup access for the shares. The shares are working at the moment only because I made them public temporarily. Does anybody have any ideas why the smbpasswd command would return an "command not found" error? I do not have a /etc/samba directory and installed samba by getting the files from www.samba.org, not off the Mandrake 9.1 cd. I have the the smbpasswd executable in /usr/local/samba/bin. Do I have to be in a certain directory to use it? Thanks for any help you can give me on this.

freemansweb
09-07-2003, 11:44 PM
Anything in your logs? In your conf have you allowed the ip of your windows machine? Your login names?

j79zlr
09-08-2003, 10:12 AM
Something seems wrong with your installation.

First problem, it should have created the /etc/samba directory.

Second problem, are you running the smbpasswd as root? The correct syntax should be smbpasswd -a User it should then add that user and prompt to enter a password. If you haven't done that, that is why the Windows users cannot access the shares. There also needs to be a line in the smb.conf file to point to your smpasswd file.

smb passwd file = /etc/smbpasswd

What does the command testparm return?

The localhost problem maybe solved by adding this line in your config file:

netbios name = something

mairving
09-08-2003, 11:51 AM
Originally posted by j79zlr
Something seems wrong with your installation.

First problem, it should have created the /etc/samba directory.

Compiling samba by default doesn't create an /etc/samba directory. Most distros including slack will create the folder if you install it via their system. It also does not by default add smbpasswd and the other binaries to /usr/bin. You will have to copy the binaries from /usr/local/samba/bin over to /usr/bin to get it to work. Of course, you can run it via /usr/local/samba/bin/smbpasswd or if you are in that directory.

Floppyman
09-10-2003, 04:37 PM
Ok, everything is working fine now. I just have one more question regarding users.

I created two usernames and two different passwords on the linux box, one for each share that I'm mapping on my win2k box. Now, when I go map the first share it asks me for a username and password. I enter those and the drive gets mapped on my win2k box from the linux box. However, when I go to map the second share I don't get prompted for a username and password, it just gets mapped, even though there are two users and two different passwords. I doesn't matter which share I map first (i.e. which username and password I enter first) the second share (whatever it ends up being) gets mapped automatically). I checked and public is set to "no" on each share. Could this be because I'm trying to map both drives from the same machine? Could it be because my username and name are similar on the win2k and linux box? Thanks again for the help.