LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba - login problems (https://www.linuxquestions.org/questions/linux-networking-3/samba-login-problems-465915/)

Dave S 07-20-2006 10:17 AM

Samba - login problems
 
Hi,

I have been fighting with Samba for 2 weeks now. Heres a breakdown:

I am trying to set up RH 9 with Samba 2.2.7 to act as a file server for 21 Win XP home edition pcs.

I have always been able to see the server from the clients. But not been able to log in.

Now I can login. But, only on one client. If I try to login on another client, sometimes it will let me in, but most of the time no. If I restart the client that it is logging me in on, then it will refuse. It says either "there is a computer with the same name on the network, change the computer name" or "network path not found"

I have all the clients set up with static IP addresses. 192.168.0.(number). I set the RH server IP address to 192.168.0.2. There is a loopback address of 127.0.0.1

This seems to be a naming problem??? Am I right? I do not know much about WINS or DNS or anything like that. Is someone can explain, thank u.

All the clients have one login (student) with no password. All I want is for the 21 win xp clients to be able to see one folder on the server without having to type in passwords etc to access it. Security is not an issue (yet)

Can someone please help me? I have limited internet access, twice a week. And am determined to stick this out to the end!!

Thanks

Dave

marozsas 07-20-2006 11:29 AM

Try to change the name of your windows clients.
In the windows, click with the right button on computer, properties, Name of computer tab. Make sure the name of computer is unique in your network.

iamwilliam 07-20-2006 04:45 PM

Hi Dave
could u post your smb.conf file

sco1984 07-21-2006 07:31 AM

Quote:

Originally Posted by Dave S
Hi,

I have been fighting with Samba for 2 weeks now. Heres a breakdown:

I am trying to set up RH 9 with Samba 2.2.7 to act as a file server for 21 Win XP home edition pcs.


How can you invite Windows XP Home edition PC's in to any network?
I shocked to hear this .....Windows XP Home edition has no networking support. Even if you connect two laptops or desktops over
cross over cable and trying to see those comps in a network..
It's not possible ....

jschiwal 07-21-2006 07:46 AM

It sounds like you want to use the security=share mode. With XP Home edition, you can't use security=domain or security=ads. Also, look at the "ForceUser" and "ForceGroup" options. I think you want to force the user to guest and enable read and write access to the guest user.

First, I would recommend installing Fedora Core. Red Hat 9 is very old, and Samba 2.2 doesn't have some of the features of Samba 3.

Your smb.conf file probably should look something like this:
Code:


[global]
  workgroup = WORKGROUP
  security  = SHARE
  printcap name = CUPS
  show add printerwizard = No
  wins support = yes

[students]
  comment = Students Files
  path    = /data/studentfiles
  read only = No
  force user = student
  force group = school
  guest ok = Yes
  nt acl support = No

[printers]
  comment = Print Temporary Spool Configuration
  path    = /var/spool/samba
  printable = Yes
  guest ok = Yes
  use client driver = Yes
  browseable = No

I adapted this from example 2.2 of Samba-3 by Example. The wins support might not work with samba 2.2.

The user and group name, I just made up. You can create and use your own using a more appropriate name. Same goes for the the name and location of the share. Use the path that you already have on the server.


Setting the SUID/SGID bits on the directory may eliminate access problems on stored files:
Change the permissions of /data and /data/studentfiles:
sudo mkdir /data
sudo mkdir /data/studentfiles
sudo chown -R student:school /data
sudo chmod -R ug+rwxs,o-w,o+rx /data

This will cause all saved files to have "student" ownership and "school" group access.

On the windows computers set the wins ip address to 192.168.0.2.

Check if you have the "samba-docs" package. It may include documentation containing a similar example. With Samba3, it would contain the "Samba 3 by Example" book.

I think that not having a username may cause problems in windows networking. However, not having a password should be ok. Every windows computer needs a uniq name. You could give them simple names like xp1, xp2, ... xp20.

Good Luck.

marozsas 07-21-2006 07:51 AM

Quote:

Originally Posted by sco1984
How can you invite Windows XP Home edition PC's in to any network?
I shocked to hear this .....Windows XP Home edition has no networking support. Even if you connect two laptops or desktops over
cross over cable and trying to see those comps in a network..
It's not possible ....

Yes, WinXP HOME has BASIC network file sharing support. It supports only WORKGROUP network mode.

WinXP HOME has not support for join to a domain. You can't use WinXP Home to work with an AD server.

We use lots of WinXP Home here in the work to access shares in a Workgroup.

bernied 07-21-2006 08:04 AM

I think I do what you are wanting, but with less pcs (but at least one of them does run XP Home). I have one shared folder that anyone on the network can get to without passwords. The folder and all its contents are 'owned' by the user guest. This is my /etc/samba/smb.conf (i have changed some bits out of paranoia) :
Code:

[global]
        workgroup = Workgroup
        server string = Shared Store
        security = SHARE
        null passwords = Yes
        guest account = guest
        log file = /var/log/samba/log.%m
        comment = Linux Samba Server
        hosts allow = 192.168.0., 127.

[share]
        comment = Shared files
        path = /path/to/Share
        read only = No
        guest only = Yes
        guest ok = Yes

But this is Samba 3.0.22
The other thing I have done is mapped the IP of the server to it's name on the clients. You need to add an entry in the hosts file in C:\Windows\system32\drivers\etc\ or somewhere nearby - your entry would look something like this:
Code:

192.168.0.2      servername
but the location of this file varies between Win distributions - there should be some help on the machines.

Dave S 07-25-2006 07:40 AM

Hi,

Thanks guys. I will try all suggestions made and get back to you all by the end of the week.

I now have all clients seeing the server, but getting the message. "you are not authorized to log on from this machine"

Again thanks, and I will let you know by the end of the week.

Dave

Dave S 07-26-2006 09:31 AM

Hi Guys,

Sorry to say, but I tried all of the above and it results in the exact same problem. Either the client tells me "network name cannot be found", or "you are not authorized to log on from this machine"

The Win Home clients can see each other and share files between themselves no problems. So I really do not think its a hardware problem. I can ping everything both with IP address and netbios name, no problems there.

At the end of the day sometimes samba lets me in, sometimes not... the most common error is "network name cannot be found"

I have more luck if I change from share to user I have to type a password but it lets me in,


The only thing I just stumbled across are these log files. I just took an extract out from both smbd and nmbd

Log.smbd

[2006/07/26 11:21:23, 0] passdb/pampass.c:smb_pam_passcheck(827)
smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User system3 !
[2006/07/26 11:21:25, 0] passdb/pampass.c:smb_pam_passcheck(827)
smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User nobody !
[2006/07/26 11:21:28, 0] passdb/pampass.c:smb_pam_passcheck(827)
smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User cerc !

Log.nmbd

[2006/07/26 11:36:49, 0] nmbd/nmbd_responserecordsdb.c:find_response_record(235)
find_response_record: response packet id 20397 received with no matching record.
[2006/07/26 11:36:49, 0] nmbd/nmbd_responserecordsdb.c:find_response_record(235)
find_response_record: response packet id 20398 received with no matching record.
[2006/07/26 11:38:39, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(404)
*****

Cerc is a user name on the clients and on the server. system3 is the computer name of one of the clients.

I really am at a loss. I do not see a point in posting my config file as I have tried all the others written in this post. Any suggestions about why this problem is happening?

dave

bernied 07-26-2006 07:17 PM

EDIT: Sorry, forget this, you obviously have done all this if it is working sometimes

Have you added users and set the password using smbpasswd ?
Or are you expecting samba to read your linux password file - it won't. Although smbpasswd will only add usernames that are on your system.

In my example config, you would need to do, as root:
smbpasswd -a guest
Then hit return twice, to confirm no password.

You also need to restart samba after changing config files for them to take effect.
There might be a special redhat way of doing this, unless it's
/etc/init.d/samba restart
which is how I do it.


All times are GMT -5. The time now is 09:31 PM.