Click to See Complete Forum and Search --> : Samba and WinXP Problem
the.spike
07-21-2002, 09:01 AM
I'm having trouble connecting my WinXP box (spike-1) to my linux box (spike-2).
I'm a Linux newbie who is experienced in Windows and Unix but has finally got disillusioned with MS. (Although after a week struggling I can see we still have a way to go yet with Linux).
I'm running Suse 8.0 Professional that I have just installed. Having followed a number of different tutorials I am still unable to connect from spike-1 to spike-2.
The network is in place as I can ping in either direction. I can also mount the XP drives on spike-2. (spike-2 is dual boot XP/linux and the XP side, when booted still works fine).
I can see spike-2 from spike-1 but I cannot map any drives nor can I browse the machine via network neighborhood.
When ever I try to connect from spike-1 a message either telling me that "The account is not authorised to log in from this station" or that the network path is not found.
I'm using the same user (spike) on both spike-1 and spike-2. I have also created this user in Samba using smbpasswd -a spike.
I'm using the simplest smb.conf file that I believe I can use (and which is used in most of the tutorials that I have found).
[global]
guest account = pcguest
workgroup = MSHOME
[scratchdisk]
comment = scratch disk
path = /scratch
read only = No
public = Yes
I have created /scratch and given it 777 permissions. Seems though that spike-1 isn't getting that far?
Any thoughts?
spike...
(slowly getting miffed and beginning to think MS ain't that bad after all.... :( )
cowanrl
07-21-2002, 09:41 AM
In looking at your smb.conf file, there are 2 settings you need to add to the global section:
security = user
encrypt passwords = yes
Besides that, here's some of the most common problems with Samba.
* The #1 problem is a firewall. Some Linux distros install a firewall by default and this will block Samba traffic. Make sure you don't have a firewall running that is interfering with Samba.
* Microsoft made some major changes to their networking starting with Win2k. You need to be sure you have a very recent version of Samba when you work with Win2k or XP. You want at least 2.2.4. If you upgrade, get the latest from www.samba.org which I beleive is 2.2.5-1.
* If you have an all XP network, often the NetBIOS over TCP/IP protocol won't be running on the machines. You need this protocol to communicate with Samba. When you introduce a Linux machine to the network, the XP machines can't see the Samba shares. I beleive you enable NetBIOS over TCP/IP on the advanced page of the TCP/IP properties page in XP
With that said, there are things you can do to check if Samba is running properly:
* Usually there is a script that is used to start Samba. On Red Hat, it is /etc/rc.d/init.d/smb. If you execute:
/etc/rc.d/init.d/smb status
it should respond with something like:
smbd (pid 2360) is running...
nmbd (pid 2365) is running...
If you see anything other than that, Samba hasn't started properly.
* If you have the Samba client installed on your linux box, you can check your Samba shares with the command:
smbclient -L localhost -N
It should respond with something like:
added interface ip=192.168.1.40 bcast=192.1.1.255 nmask=255.255.255.0
Domain=[SMBTEST] OS=[Unix] Server=[Samba 2.2.5]
Sharename Type Comment
--------- ---- -------
data Disk Common data directory
IPC$ IPC IPC Service (Samba Test Server)
ADMIN$ Disk IPC Service (Samba Test Server)
Server Comment
--------- -------
LINUXSMB Samba Test Server
Workgroup Master
--------- -------
SMBTEST LINUXSMB
MAIN MAINNT
If you get some kind of an error message or don't see any of your shares, Samba isn't running properly. I realize it's almost impossible to format those screen outputs properly with the editor on this site.
Hope this info helps some.
aceracer24
07-21-2002, 10:06 AM
Something else you need to log into a linux samba server is permission. You can do this by typing smbpasswd -a (username)
example : smbpasswd -a david
Then it should ask you for a password to use. Then it will ask for you to retype this password. Finally is should say (username) added
Now from your XP box you should be able to log into the samba server using what ever user name you added to the samba server. One note..I THINK that what ever user you add to the samba server MUST have an account on that linux machine. Example..if you want the XP box user david to be able to view the samba server..you have to first make a david user account on the linux machine and then you have to do the smbpasswd -a thing.
the.spike
01-12-2003, 04:49 PM
OK.. so 6 months later and Linux on a different machine (spike-3) I play with Samba again.
I download and compile the latest version.. seems to go OK. I can list the shares on my linux box but when I get to the bit about trying to connect with the unix client "smbclient //spike-3/homes" (since my box is spike-3 and the share is called homes) I get an error.
session setup failed: NT_STATUS_LOGON_FAILURE
Can't do anything about it.. I try different users (I've only got two and one of them's root), with different passwords and still the same. I trawl the web but can't find anything useful.
Then I come across my old post and following the instructions I find there, still nothing :mad:
"To hell with it, I'll just try to connect to it from XP." Waddaya know, damn thing worked like a dream..
Gents, thanks for your help..
:cool:
Try this:
cat /etc/samba/smbpasswd
This should show what accounts and their encrypted passwords that will work with Samba.
Next do try test the Samba shares:
smbclient -L -N //localhost
This should display the shares available from your Samba host... it should include homes.
Now try connect to it:
smbclient //localhost/homes -U username
Where "username" is a valid user out of /etc/samba/smbpasswd.
Note that if you enable encryption in your smb.conf (encryption = yes), you will need to change the passwords of all users that have none-encrypted passwords in smbpasswd.
You change passwords using smbpasswd.
Read the following man pages:
man smb.conf
man smbclient
Try downloading the Documentation from www.samba.org.
The thing about Linux is there is a lot of reading and a lot of mucking around. Especially when you play with something new... if you can hang in there and maintain patience with working with things that don't nessarily work out of the box, you will find things will eventually flow.
Cya round
Jinx