LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-12-2009, 01:23 PM   #1
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Rep: Reputation: 0
Windows XP Pro not seeing Samba server


Hello everyone,

I'm fairly new to the world of linux and very new to the world of servers. I've been researching and attempting to setup a Samba server on a linux box running Mandriva 2009. I have tried different configuration recomondations from different sites and also fooled around with it myself. My problem is I cannot get the Windows XP box to see the Samba server in the workgroup. Here is my smb.conf file:

# Samba config file created using SWAT
# from UNKNOWN (À·ðñ<)
# Date: 2009/01/12 14:10:53

[global]
workgroup = TRIPLES
netbios name = TRIPLES-SERVER
server string = Samba Server %v
map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 50
time server = Yes
printcap cache time = 60
printcap name = cups
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
dns proxy = No
wins support = Yes
ldap ssl = no
valid users = brian, john
admin users = brian

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
use client driver = Yes
browseable = No

[print$]
path = /var/lib/samba/printers
write list = @adm, root
inherit permissions = Yes
guest ok = Yes

[pdf-gen]
comment = PDF Generator (only valid users)
path = /var/tmp
printable = Yes
printing = bsd
print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" &
lpq command = /bin/true
lprm command = lprm -P'%p' %j

[John's Documents]
comment = Sample Documents
path = /home/john/Documents
read only = No
acl check permissions = No
guest ok = Yes

Thank you in advance for any advice you can offer me.
 
Old 01-12-2009, 03:26 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
have you setup the smbusers? on the linux box, something like
Code:
smbpasswd brian
will create a samba account for the user brian. brian can then access his share! make sure the Win XP machine is in the same workgroup / domain as the samba server.
 
Old 01-12-2009, 03:53 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You also need to make sure your firewall rules are letting smb traffic through (137-130 and 445)
 
Old 01-12-2009, 04:06 PM   #4
tdetre
LQ Newbie
 
Registered: Dec 2008
Distribution: Debian
Posts: 8

Rep: Reputation: 0
Can you access the samba server using the ip address instead of the name? If yes, then you may need a wins server or check if your server is registering with a 'master browser'. It depends on your network topology.

If you can't get to it via the ip address, check your firewall setting and check to make sure the samba daemons are actually running.

If you get any errors, post them here and we can try to diagnose the problem further.
 
Old 01-12-2009, 09:26 PM   #5
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158
Blog Entries: 1

Rep: Reputation: 30
Schulte,

I have just finished setting up Ubuntu Server 8.10, and it has taken a lion's share of my time these past few weeks. However, I did manage to get it working, and I also managed to completely recreate the installation, twice, in a very minimal amount of time. It helped that I had bought three 80 GB HDDs that I was able to swap out and do a fresh and clean install, keeping the last one as the latest until the next one got further, eventually making it all the way through, and then being able to do it twice more from scratch. Finally, I had one up & running, shut it down, swapped the HDD, rebooted, and it was like I had been using the same HDD the whole time. And, I have high praise for the assistance provided by Billymayday - it was his help that pointed me in the right direction, several times, and got me over serveral humps.

But, I digress.

I may be suggesting the obvious, but I'll start at the bottom. The FIRST thing to do is to make sure that the Samba workgroup (workgroup = TRIPLES) is the same as your Windows workgroup. And, make sure that your IP addresses are all in the same range (192.168.1.xxx, with a subnet of 255.255.255.0 - I'm not going to give you a TCP/IP lesson here, but if you've got the subnet mask of "-8" or 255.255.255.0, then the IP range can go from 192.168.1.0 to 192.168.1.255, with .0 and .255 reserved and not assignable to a machine). If all that is done, and you've done a fresh power-down reboot of the server and then the XP desktop, then you should be able to open your Windows Explorer and go to My Network Places, then to Microsoft Windows Network, Then to TRIPLES, and you should see each of the computers in the workgroup - IF the router is doing it's job correctly. I say that because I've got an old Belkin router that works great, but the new one won't let me see any other computers in the workgroup. So, I'm about to battle that demon myself. I know the NETWORK is set up properly because everything is working fine with the old router. BUT, the new router is being anal about allowing that to happen. So, it is possible that you're experiencing something similar. If you have two XP boxes, then they should be able to see each other, under the conditions provided above. If they can, and the conditions above are met, then you should be able to see the Linux box, too.
 
Old 01-13-2009, 07:50 AM   #6
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you everyone for you advice and help. Here's an update. I wasn't able to see the server at all before. Other XP boxes could see each other though so I know the router is working properly. I decided to then switch the role of the server from a domain controller to just a stand alone server with no logons or security just to test things out. Turns out I can see the server with those settings.

I now run into the problem of not being able to actually access the files. I try to click on the server from the workgroup computers screen and it says that I don't have permission to access the network resource. In the same message it tells me that the network path is not found. Here is my updated smb.conf file I am using at the moment. I commented out the printing section because that won't be used on the samba server.

# Samba config file created using SWAT
# from UNKNOWN (Ì·ðñ<)
# Date: 2009/01/13 08:25:09

[global]
workgroup = TRIPLES
netbios name = TRIPLES-SERVER
server string = Samba Server %v
security = SHARE
encrypt passwords = No
map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 50
time server = Yes
os level = 65
local master = No
domain master = No
dns proxy = No
wins support = Yes
ldap ssl = no
valid users = brian, john
admin users = brian
hosts allow = all

[homes]
path /home
comment = Home Directories
read only = No
browseable = Yes
available = Yes

#[printers]
#comment = All Printers
#path = /var/spool/samba
#create mask = 0700
#guest ok = Yes
#printable = Yes
#use client driver = Yes
#browseable = No

#[print$]
#path = /var/lib/samba/printers
#write list = @adm, root
#inherit permissions = Yes
#guest ok = Yes

[John's Documents]
comment = Sample Documents
path = /home/john/Documents
read only = No
guest ok = Yes
available = Yes

PS: In looking at the files in the /etc/samba directory I noticed a file called smb-winbind.conf. It seems to be what my regular smb.conf file was before any editing was done. Can anyone tell me what that is for and if that file could be in conflict with the smb.conf?

Thank you again as any help is much appreciated.
 
Old 01-13-2009, 08:36 AM   #7
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158
Blog Entries: 1

Rep: Reputation: 30
That would be my "Issue #2" (with the first one being able to see the server). The solution is to create users, but it's not a simple, single command solution.

You first have to create users in Linux, so that the users can have access to the actual server - they need to be able to logon AT the server, or via PuTTY (or other terminal emulation program). The command to do this is USERADD, and you can look that up, along with USERMOD and USERDEL. Make sure that you do this using the same login name that the users use on their Windows box! Do this with ROOT privileges.

I've found that even using the password option of the USERADD command does not (not for me, at least) actually create the password, so I then had to use the PASSWD command. Of course, you have to do this with ROOT privileges, too (tho I think the users can do this themselves, but only for themselves). Make sure you do this using the same password that the users use on their Windows boxes!

Once you've done these 2 things, then open up a separate terminal window and logon as the user. This will at least tell you that you've done this much work correctly. If the user can't login to the Linux box, then something was done incorrectly and you should try to do it again. If you try USERADD and get an error message that it's already been done, then maybe the password was wrong, or use USERDEL to remove the user and start over. If the user can't login to the Linux box from the Linux box (or from a PuTTY [or other terminal program] window), they won't be able to do it from a Windows box.

Next, go back to being the ROOT user, and create the SAMBA user with the SMBPASSWD command. The context should be "smbpasswd -a login-name" It should prompt you for the user's password, and then to confirm the user's password. And, it should come back and say that it successfully added the user.

At this point, you could stop Samba ("service samba stop"), but I prefer to shut down the server ("shutdown -h now"), and shutdown the Windows machine. Then reboot the server and get it to the login prompt. You don't need to login AT the server, it'll be running without having someone login. Then, boot up the Windows machine and login to it. Then, bring up your Microsoft Windows Network, and see if you can get into your server.

The problem you're having is one that took me days to overcome. Billymayday had me try to login to the server as the user, and it failed. I had created the user with the password option (not the passwd command) and just ASSUMED it worked. But, it apparently didn't, and I spent days under the assumption that all was good, and I couldn't make it work until the user couldn't login to the server.

I thought I had provided a link in my earlier post, but apparently did not. In the process of going through my own setups (I did it about 5-6 times), I created a document with all of the steps detailed. As I went through the steps each time, I tweaked the instructions. Eventually, I got it to work, then I did it again on a separate hard drive, tweaking the instructions further. And then I did it again just to make sure that everything was correct. Finally, I had it working, so I shut it down, removed the OS HDD and put in the other OS HDD, and rebooted the server. I did this to prove that replacing a failed OS HDD would be a simple swap without needing any extra programming. It worked perfectly and booted up and ran without needing any intervention whatsoever.

So, with a few caveats, I'll provide you the link to my document here. The caveats are that I created my RAID5 array when I did my first installation of OpenSuSE. I copied all my data to it, then decided that I didn't like OpenSuSE. So, I pulled out the OpenSuSE OS HDD and put in a blank one and started working with Ubuntu Server 8.10. THEN, I mounted the RAID5 array, and it worked just find. All my Ubuntu Server installations were done in this manner - without creating the RAID5 array in Ubuntu. That'll be a spot where I can be of no help.

If you're sharing folders and want everyone to be able to RW all the files in the folder, there may be some tricks you'll have to do for that. They're documented in the document linked to above.

PS, the winbind version of smb.conf is probably a backup. I don't believe that it is referenced by Samba. My suggestion is to google every new thing that you find - you'll be amazed at the wealth of info that's available. I started doing that and found great explanations for everything I was doing - tho it didn't keep me from having questions or needing guidance, it did increase my knowledge greatly.

Last edited by DarkFlame; 01-13-2009 at 08:38 AM.
 
Old 01-13-2009, 09:34 AM   #8
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
DarkFlame, thank you for your incredibly detailed posts. I have created the user on the linux box with the same name as the user trying to access the server on the XP box. I also have a smb user account for the user. One thing that you mentioned caught my attention though. You said that the passwords have to match both on the linux and XP users. There currently is no password set for the windows user and there is only a logon box because a while ago I had configured the machine for windows file sharing. Could the problem be that the windows user doesn't have a password?

I also thought that the password and user issues shouldn't be a problem since I have no security or logons enabled currently for the samba server. It is set up as a stand alone server at the moment, at least I'm pretty sure that's what my configuration is set up for.
 
Old 01-13-2009, 10:28 AM   #9
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158
Blog Entries: 1

Rep: Reputation: 30
Mine, too, is a stand-alone server. As I understand it, that means it's the only server on the network (I could be wrong, I'm not much more experienced than you).

I setup our WinXP Pro boxes to requre username and password when I did our original installation. I added file sharing so that we could access each others' files (we take pictures and they're stored on both systems, and we both need access to the pictures on both systems). To do this, it's fairly easy: On your XP box, go to Control Panel. MY control panel is in classic style, but when I click on USER ACCOUNTS, it takes me to an XP style screen where I can Change an account, Create a new account, or Change the way users log on or off. I use the Classic Logon Prompt (uncheck "Use the Welcome Screen"). Then, you may have to setup a password for that user (or "change" the password from blank to something specific). For TESTING purposes only, I use the password "password" so that I don't have to worry which one I'm testing since they all have the same password. But, DO NOT LEAVE it as "password" because that's the most used password on the planet.

I'm about to head off to work, so I'll be away from the computer for about 10 hours, or so. Good luck!
 
Old 01-13-2009, 02:38 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Passwords for linux and windows users DO NOT need to match. Windows and samba users DO need matching passwords (this isn't strictly true, but work with it).

ALso, comment out "encrypt passwords = No", since as I recall, latter windows versions need registry hacks to send clear text passwords.

If you don't want a windows password, when you create a samba user, don't set a password.
 
Old 01-13-2009, 10:05 PM   #11
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158
Blog Entries: 1

Rep: Reputation: 30
Granted, I'm more than a little anal retentive, especially when it comes to keeping things straight. Learning how to cope with ADD kinda did that to me. So, when I create users with the same login on different systems, it's just easier for me to create them using the same password. Establishing consistency is one of the ways that I improve my attention span - if I don't have to keep so many things straight, I can handle more things.

I'm certain Billymayday is correct in that you don't even need to have passwords to access the server. That concept never crossed my mind, and I definitely trust what he says with regard to Linux systems. The more I think about it, one could put users in different groups, where each group has different permissions for the shares, without ever having a password on anything. I've learned another new bit of information today!

However, if my daughter grows up to be as inquisitive as I am (& there is evidence that it's happening, not just with her but with the twins, also), then I'm protecting myself from their keyboard-wandering skills that will be developed in the future by having passwords on my home server. I don't want her logging in as me and looking at our vacation budget when she doesn't even KNOW we're planning on taking her to Disney in '10. So, we enact that level of security.

What I've read about matching passwords in Windows & Samba is that life is much easier if they're the same, or else you'll have to login to your Windows box, and then login to the Samba server separately. When they're the same password, it's seamless. This is how I understand it.
 
Old 01-13-2009, 10:50 PM   #12
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Windows and samba you definitely want the same, but samba and linux don't need to be (although usually would).
 
Old 01-14-2009, 09:06 AM   #13
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Ok, the samba and Windows users now both have no password. I'm assuming for the smbpasswd -a when it asks you for a password you just hit enter twice without typing anything to allow for no password.

I have all ports allowed on the Windows firewall necessary even though Windows firewall is disabled (though it says it's on in the security center...good job Windows).

I tried to ping the linux box (I'm assuming you use the IP from ifconfig) and I got the response that the requests had timed out. Any ideas with this new update?
 
Old 01-14-2009, 09:50 AM   #14
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158
Blog Entries: 1

Rep: Reputation: 30
I'm not sure of what to look for on that one (no ping reply), but I have a few thoughts.

You've got the firewall turned off on the Server, too?

If so, then I'd download PuTTY (Google for it & you'll find it. You install it on you XP box. It's a terminal emulation program that gives you CLI access to your server from you XP box), install & configure it, and see if it will gain access.

If it will, then I'd say not to worry about the ping until it causes other problems. If it won't, then you've got an issue to resolve. Do you have SSH installed on the server? You'll need that to to use PuTTY.
 
Old 01-14-2009, 12:02 PM   #15
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
I tried using putty and I got the same timed out message. I'm pretty sure with the ping you should see a message saying the pinged machine sent you back packets although I really have very little knowledge in this area.

Is there any chance that the fact that the Linux box is connected through wireless with a WEP encryption is affecting anything?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to Samba Server share from windows 2000 or xp pro machines dan98 Linux - Newbie 1 10-09-2007 05:14 PM
Cannot connect to Samba Server share from windows 2000 or xp pro machines dan98 Linux - Newbie 1 10-09-2007 12:53 AM
Tip: Samba PDC VMware Server Windows XP Pro kris.kj.jacobs Linux - Software 1 01-01-2007 05:31 PM
Samba as File & Printer Server with Windows XP Pro as client FrontRunner Linux - Newbie 0 08-17-2004 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration