Trying to get samba working with a new install. So far I can't ping by name either way, from client to server or vice versa.
My client is Win7. With my old server (CentOS 5) I could just browse the network from my client and the server would appear by name just like any other computer on the network. My network is just a simple home setup, nothing fancy. DHCP from my wireless router, although I did set the CentOS box to a static IP. It can get out to the internet just fine and ping my client by IP.
So, first question is how to get name resolution working. I know I could simply put entries in the lmhosts files, but I'd like to know how to make it work without doing that. My clients are DHCP so they could in theory change IPs.
The next issue is samba. When trying to map a drive (using the IP address at this point) it wants a username and password. I only have two accounts on the CentOS box, root and . Neither one of those gets me in. From the Win7 client it acts like I'm trying to login to a domain, which I don't have. The domain name simply being the local name of the PC. I can change that using the "domain\username" syntax but I'm just using a basic workgroup, no domain exists. So, yeah, what's up with that?
Thanks for any advice you guys can give me.
Noob networking questions (samba shares, and name resolution)
Re: Noob networking questions (samba shares, and name resolution)
First problem sounds like firewall issue.
Samba: Have you created any samba user (smbpasswd -a user)?
Samba: Have you created any samba user (smbpasswd -a user)?
Re: Noob networking questions (samba shares, and name resolution)
Ok, I sorted out the network browsing issue, all fine there.
I hadn't heard about the smbpasswd command, and I've been going through the guide at Samba.org. They make it sound like all you do is define in the smb.conf file which users have access to the shares. Then you're good to go.
Obviously false. So I did what you suggested, added a password for my account using smbpasswd. It worked, once. I managed to get right into the share no problem, didn't even ask me for a login because I was using the same name and password on my windows machine. Cool. Except after that one time it won't work any more. Back to the same behavior of asking for username and password and rejecting anything I type in. Nothing changed on the server, I didn't touch it.
This is rather frustrating. I know Samba has been around for a while now, why is the config so convoluted? You have to define shares in one file, users in another, and then use a command line tool to add passwords for users that already exist in the system? And then... whatever else I'm missing.
I mean there's literally a book written on it over at Samba.org, and I've poured through the users and security sections about 10 times, and they appear incomplete.
Sorry, just venting. Windows, for all it's flaws, can do this stuff in like 30 seconds. I've spent hours on Samba and it's still not working.
I hadn't heard about the smbpasswd command, and I've been going through the guide at Samba.org. They make it sound like all you do is define in the smb.conf file which users have access to the shares. Then you're good to go.
Obviously false. So I did what you suggested, added a password for my account using smbpasswd. It worked, once. I managed to get right into the share no problem, didn't even ask me for a login because I was using the same name and password on my windows machine. Cool. Except after that one time it won't work any more. Back to the same behavior of asking for username and password and rejecting anything I type in. Nothing changed on the server, I didn't touch it.
This is rather frustrating. I know Samba has been around for a while now, why is the config so convoluted? You have to define shares in one file, users in another, and then use a command line tool to add passwords for users that already exist in the system? And then... whatever else I'm missing.
I mean there's literally a book written on it over at Samba.org, and I've poured through the users and security sections about 10 times, and they appear incomplete.
Sorry, just venting. Windows, for all it's flaws, can do this stuff in like 30 seconds. I've spent hours on Samba and it's still not working.
Re: Noob networking questions (samba shares, and name resolution)
Ok, hopefully this added info will help.
I can now browse the network and see my server. I can open it up and see the share. I get a login prompt when trying to access the share.
I have an account named kevin on the CentOS box. I have added that name and password to the Samba config with smbpasswd, and confirmed that it's there with pdbedit. It worked for all of five seconds, I had one successful connection.
Now no matter what I do it won't let me in.
My smb.conf file looks like this:
[global]
workgroup = Olympus
wins support = yes
netbios name = Zeus
server string = Linux Server
name resolve order = wins lmhosts hosts bcast
client lanman auth = yes
security = share
[data]
path = /mnt/data
comment = Data Drive
volume = Shared Data
writable = yes
username = kevin
only user = yes
When I run testparm everything looks good. When I run "smbclient //zeus/data -Ukevin" it prompts me for my password. When I type it in it says
Server not using user level security and no password supplied.
tree connect failed: NT_STATUS_WRONG_PASSWORD
I know it's the correct password, both for logging into the CentOS box and in Samba.
Very frustrating.
I can now browse the network and see my server. I can open it up and see the share. I get a login prompt when trying to access the share.
I have an account named kevin on the CentOS box. I have added that name and password to the Samba config with smbpasswd, and confirmed that it's there with pdbedit. It worked for all of five seconds, I had one successful connection.
Now no matter what I do it won't let me in.
My smb.conf file looks like this:
[global]
workgroup = Olympus
wins support = yes
netbios name = Zeus
server string = Linux Server
name resolve order = wins lmhosts hosts bcast
client lanman auth = yes
security = share
[data]
path = /mnt/data
comment = Data Drive
volume = Shared Data
writable = yes
username = kevin
only user = yes
When I run testparm everything looks good. When I run "smbclient //zeus/data -Ukevin" it prompts me for my password. When I type it in it says
Server not using user level security and no password supplied.
tree connect failed: NT_STATUS_WRONG_PASSWORD
I know it's the correct password, both for logging into the CentOS box and in Samba.
Very frustrating.
Re: Noob networking questions (samba shares, and name resolution)
Did you try it first by making a simple share like:
[data]
comment = data
path = /data
writeable = yes
create mode = 0777
directory mode = 0777
guest ok = Yes
public = yes
read only = No
browseable = Yes
[data]
comment = data
path = /data
writeable = yes
create mode = 0777
directory mode = 0777
guest ok = Yes
public = yes
read only = No
browseable = Yes
Re: Noob networking questions (samba shares, and name resolution)
Yes, that worked. I wanted something with a tad more security though. I have settled on the User setting for the share. Share level security simply refuses to work, but if I l switch to User level it works fine. This is somewhat annoying because unless I have the username and password in Centos exactly the same as on the client it prompts for a login every freaking time you try to access the share. But I supposed I can live with it.
Re: Noob networking questions (samba shares, and name resolution)
Hey WallyWest, it is a bit of along time since your last post and I am wondering if you eventually got it all working as you wanted, And if so how. I am just starting out on a similar path and found you posts while researching how to set Samba up as a print server.