Linux network problem

Posted by: pedrohoon

Linux network problem - 23/09/2005 12:23

I have a PC running WinXPpro on the same network as a PC running Debian 3.0 (Knoppix HD install), connected through a switch.

I can ping each box from the other, and in Konqueror I can "smb://server/share" the XP box and see the contents of the shared folder.

When I go through 'My Network Places' on the XP box I can see the Linux box.

When I click on it to connect, it brings up a dialogue requesting a username and password, so I fill this in with the username and password I am already logged in with on the Linux box, and click on 'OK' but the dialogue just pops up again without connecting.

It is as though the Linux box is not recognising the credentials, or not authorising them.

Any ideas where I should start looking?
Thanks!
Posted by: JBjorgen

Re: Linux network problem - 23/09/2005 12:52

Samba doesn't use your linux authentication by default

You have to create a password for Samba using smbpasswd.

If you'd like to make the share public, let me know and I can get you instructions on how to do that.
Posted by: pedrohoon

Re: Linux network problem - 23/09/2005 13:15

OK, sorry for the dumb questions:

Do I run the command as root or user? It appears you can do either.

Can I / must I use the same passwords as I use for session login, or must they be unique?

What exactly do you mean by 'making the share public'?

Thanks!
Posted by: JBjorgen

Re: Linux network problem - 23/09/2005 13:35

Instructions on making the share public (no security at all). Do the following as root:

Add a user to be your samba guest user and set the directory you created to share as that user's home. Set the user's password (make a note of what this is!) Give that user ownership of the directory you created (/opt/share in this example).

# adduser smbguest -c 'Samba Guest User' -d /opt/share -s /sbin/nologin
# passwd smbguest
# chown -R smbguest.smbguest /opt/share

Add that same user to your samba users. Use the same password entered above.
# smbpasswd smbguest

Edit your smb.conf file (on Red Hat it's located in /etc/samba). Create a share on the directory you created (/opt/share in the example.) This is a public share that does not have any security. Sample smb.conf file:

# Global Parameters
[global]
workgroup = WORKGROUP
netbios name = Debian
server string = My Debian Box
guest account = smbguest
security = share

# Shares
[share]
path = /opt/share
read only = no
guest ok = yes
guest only = yes
public = yes


If I screwed any of that up, I'm sure someone here will correct me.
Posted by: JBjorgen

Re: Linux network problem - 23/09/2005 13:49

You may have to run smbpasswd with the -a parameter to add the user to the smbpasswd file.

# smbpasswd -a smbguest
Posted by: pedrohoon

Re: Linux network problem - 23/09/2005 14:19

So if I want to share any other directories, I have to edit the smb.conf file and add entries for them?

Is there an easier way? I notice that in Konqueror, right-clicking a directory gives a 'share' menu item - does this automatically edit the smb.conf file?

Thanks!
Posted by: pedrohoon

Re: Linux network problem - 23/09/2005 14:37

Woohoo it works!!

Thank you for the assistance!
Posted by: JBjorgen

Re: Linux network problem - 23/09/2005 14:38

Quote:
So if I want to share any other directories, I have to edit the smb.conf file and add entries for them?

Is there an easier way? I notice that in Konqueror, right-clicking a directory gives a 'share' menu item - does this automatically edit the smb.conf file?


Uh...I rarely use any GUI on linux. You'll have to wait for another response. I'm assuming that it does automatically add to the smb.conf. Once all that stuff is done for the first share, it's simply a matter of copying and pasting your smb.conf entry and changing the share name and directory for additional shares.
Posted by: JBjorgen

Re: Linux network problem - 23/09/2005 14:40

Glad I could help.

It's nice to give back a little since I've received a good bit of help in the past on this forum.
Posted by: pedrohoon

Re: Linux network problem - 23/09/2005 14:43

OK, I have just looked at the smb.conf file and it doesn't seem too hard to edit it and copy entries and modify them.

Thanks again!