First time trying Samba -- Linux can see XP, but XP can't login to Linux

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
Struggling all day to figure out Samba. Everywhere I go they keep saying it's so easy to set up.

I created a new folder on a RedHat 9 brand new install to a machine at work. I added the folder as a share in Samba and created a user and password.

I can see my windows XP files from the Linux box, but when I go to open the Samba from my desktop I get a login box that first of all replaces my login name "admin" with "FLETCHER/admin" (my desktop name is Fletcher)

And when I click OK, it just refreshes the login box and if I move the cursor away it sits there with a WaitCursor on the arrow, stalling forever.

I know so little of what I'm doing, there must be some small thing wrong.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Try just the username you inputted when you used smbpasswd(?). Did you turn on encrypted passwords?
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
I didn't "use" smbpasswd. That's where passwords are kept?

I did it all using first the Main Menu item System Settings/SErver Settings/Samba Server. After a while someone suggested that I download Webmin and use that. Now I find I cant get Samba Server to even appear from the Main Menu. Click it and nothing happens.

As for encrypted, I don't remember doing anything with that.

And unfortunately I've gone around trying this and that, like being in the dark. I wondered if since I created a user account (like the install instructions suggest) and named it "admin", there was a problem with naming the Samba user "admin", and since Windows kept forcing my login to FLETCHER/admin, I tried changing the samba name to FLETCHER/admin. At some point I saw a choice in Webmin to change Security to Share level or User level and I played with those a while. One time I tried to telnet to the linux box and couldn't - port 23 was refused. I wonder if there is some general permission I'm missing.

Back to smbpasswd, I see "admin" there with 500: and lots of XXXX's and NOPASSWORD.

No password? I didn't remove the password, did I?

This is what I get for blundering around. I just don't know enough. Thanks for the help, and I hope this provides some clue
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
I just found in WebMin a place for Authentication, and it showed Encryption as "Yes"
 

Mr54mk

Junior Member
Sep 17, 2004
4
0
0
YO!!
I recently networked 2 Linux computers to my XP machine using samba. When you setup samba you need to make sure that you edit the smb.conf file located in /etc/smb.conf. You need to vi the file. Ex: cd /etc
then vi smb.conf
The reason why samba is so complicated to you is because you're using gui's to try and do something that can be done so much easier using a simple text editor like vi. Once you vi the file you're going to need to make sure you set up your shares for your RH 9 machine. Smb needs to know which directories you want to share it doesn't just open up the whole computer for a windows network. I would recommend reading the smb.conf file. There is a section in the smb.conf that specifies which directories you want to share. At first it seems a little too complicated but you'll catch on. After you edit the smb.conf then you create the smbpasswd for the account.
If you have any more questions post again. I was in your shoes about 1 month ago and a friend helped me out so I feel your pain!
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
Rats! I dont have the smb.conf here. It's on the linux box at work. But I did a lot of reading through it and saying "OK, there I see the share I created ... " and like that. I find I can learn things that way. If you take out all the text that's commented out (there were lots of examples in there, all commented out) it would really come down to just about this

[ShareFolder]
path = /ShareFolder
writeable = yes

I created a folder at /ShareFolder that will hold the files I want to send over from my Windows box.

So I think the share stuff is OK, I figure the problem is in some kind of security.

I created the user I wanted "admin" for Samba by using the Samba Server gui. I gave it the password "password", again using the gui

Question to Mr54mk - the smb.conf that I see is in /etc/Samba, not /etc.

I hope I can keep you guys available on Monday when I get back to work. But hey, thanks already
 

HKSturboKID

Golden Member
Oct 20, 2000
1,816
0
0
Make sure the firewall on linux is off. It happen to me when I first try to play with samba and only linux can see xp and not xp seeing linux. I couldn't figure it out why and then finally disable the firewall or allow smb and it finally worked.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
I recently set samba up, and it works perfectly with win2k3. You shouldn't have these issues. First thing you need to do is ditch the stupid gui crap and READ the config. The comments in the file are enough to setup something very basic, much like I have.

Ok, the admin user: is that an OS user or a samba user? Does the user have permission (standard unix acls if it's an OS user, or smb.conf permission if it is a samba user) to access the share directory?

Are you using user or share level security? I'm using share for simplicity. I didn't even have to create an account using smbpasswd.

Did you give your IPs permission to access the samba share? I screwed this up (I forgot my ip range :eek: ) at first and figured it out the hard way.

Are the logs displaying any errors?

EDIT: I can't see a reason anyone would enable the firewall by default. That's just kind of silly. Hopefully someone can tell you how to check.
 

EmperorRob

Senior member
Mar 12, 2001
968
0
0
Encrypted passwords used to be the # 1 problem. It's easy to overlook. Sometimes when you access a linux samba share from a windows box on a different domain you have to prefix your userid with the linux box's domain:

linuxdomain\fletcher
****password***
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
I'm happy to ditch the gui, I can generally figure out raw file stuff. I did read the smb.conf, and it seemed like it was OK the way I had it. The comments DO make sense, and I thought my setup was good, so I figured the problem was something I couldnt see in some place I didn't know about. The first thing I will do when I get back to work on Monday is look for the firewall.

I tried both share and user level security. The only difference I saw was that the Windows login at share level showed (I think my memory is right) "Guest:admin" and it was grayed out. If I did user level, it came up with an empty username box and when I entered "admin" it changed that to FLETCHER/admin automatically. Both ways it sat there spinning its wheels with a WaitCursor indefinitely. Not even a messagebox saying "Access denied" or anything else.

The admin user is both an OS and samba user. When I did the install of RH9 I set up a root password and then when I first logged in I set up a regular user named "admin" and gave that a password. When I did the Samba gui I added my user and called him "admin", with the same password. Maybe that's got Samba confused?

How do I give a user access to the shared folder?

At some point after I installed WebMin and lost access to the Samba Server gui I tried to delete admin as a Samba user but was surprised to find that apparently Webmin lets you edit users but not add or delete them. Bummer. I went to the smbusers file to see if I could do it manually, and I saw confusing things there, which I don't remember well enough to be sure -- I saw root and admin listed, but the values with them were not clear as to what they meant. I think root was paired with Administrator and admin with ????? I just didn't think I should try to muck around with that file.

How do I give my IP's permission to access the Samba Share?

EmperorRob - there are no domains. At our company we have 2 workgroups and I set the Linux workgroup value to the same, but did not see the linux box on NetworkNeighborhood until I gave the Samba a name, after which it appeared in NN under that name. It's from that point of clicking on the Samba name that the login comes up in NN.
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
and I'm the other way around -- I'm at home and dont have a copy of mine ....

Thanks for your help
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Felecha
and I'm the other way around -- I'm at home and dont have a copy of mine ....

Thanks for your help

:laugh: That's always the way.

I checked mine out before work, and it was ~395 lines, IIRC. That's why I didn't just post it here. Didn't have enough time to ftp it somewhere and link it though. :eek:
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
OK, back at work. I compared my smb.conf to Mucman's and blundered around with a few things.

Here's the current state of it:

[global]
log file = /var/log/samba/%m.log
guest account = nobody
hosts allow = 10.0.0.112
mb passwd file = /etc/samba/smbpasswdoad printers = yes
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
obey pam restrictions = yes
guest ok = yes
username map = /etc/samba/smbusers
passwd program = /usr/bin/passwd %u
dns proxy = no
netbios name = Dialer
server string = samba server
printing = cups
default = Exacom
unix password sync = yes
workgroup = exacom-lan
os level = 20
printcap name = /etc/printcap
security = share
max log size = 0
pam password change = yes

[homes]
comment = Home Directories
browseable = no
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0775

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
printable = yes


[Exacom]
guest account = admin
valid users = admin
writeable = yes
public = yes
path = /Exacom
browseable = yes

***********************************************
Here's the changes I did from Mucman
[global]
changed guest account = FLETCHER/Admin to guest account = nobody
added hosts allow = 10.0.0.112 [FLETCHER's IP]
changed security = users to security = share

[Exacom]
added public = yes


That got me so I could finally see the share, but could not open a text file from it. I added
browseable = yes

and that did it. So there is probably a lot of junk in there that I dont need, but at least it works for now.

 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
Oh dear - another question now.

Samba does not seem to start at reboot. Is there somewhere I can set it, like I know how to do with Windows Services? Linux is fun, but I'm scratching my head a lot so far
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
I found MainMenu\System Settings\Server SEtting\Services which seems to do it.

But now ... if I have my shared folder set to writeable = yes, and I can see it from Network Neighborhood and I want to write a batch file to copy a simple text file from Windows to that share, why does it tell me "Access denied"

I have a batch that will copy FROM that share over to the Windows box, but I cant copy TO that share