Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I set up Samba on a Ubuntu box, and I'm trying to provide a share to windows xp clients such that users in group 'staff' have read-only access, users in group 'doc' have read/write access, and users in any other group (including guests) can't get access at all.
The share is called RECORDS. The groups I mentioned are ones I created on the linux system, and I also created a bunch of test users in these and other groups.
On XP I see the server (cayenne) but not the share. But if in windows explorer I type the server and share explicitly, e.g.,
\\cayenne\RECORDS
I can get to it WITHOUT typing any password! No password request window pops up.
If I change the smb.conf file to use security = share (instead of security = user) and try the same access (after restarting the samba daemon) Windows will not connect and I get this error:
"... The specified network password is not correct."
Well, I never has the chance to supply a password! (But I would like to!)
What setting do I have to have in the smb.conf file, either in the [global] section or in the [RECORDS] section, to force windows request me to enter a password to make this connection?
Also, is Windows somehow caching a user/password that I may have used before? If this is the case how on earth do I clear that cache?!?
Thanks.
--Jim
This is the relevant section of the smb.conf file I'm using:
[global]
workgroup = XYZ
server string = Samba %v on %h
security = user
passdb backend = tdbsam
invalid users = root
[RECORDS]
path = /Docs/records
guest ok = no
valid users = @staff
write list = @docadmin
browseable = no
By default, windows attempts to log in as the current user (with their password). If you are attempting to log in as a different user, try clicking on the "connect using a different user" link under "Map Network drive".
Make sure you have made the smb user with smbpasswd or another samba account tool. A unix account is not sufficient.
As for smb.conf settings I am using something like this:
security = user
passdb backend = tdbsam
[homes]
comment = Home Directories
browseable = no
writable = yes
If you are still having problems, save your smb.conf and revert to the simplest possible one and add things slowly.
miedward, Thanks for the reply. Yes, all of my test users have equivalent linux accounts. The funny thing is, I'm trying to access this samba share via a completely different user name/passwd from my XP system, and I'm still getting in.
As your last sentence suggests, I'm using a stripped down sbm.conf, and working incrementally.
Here's a question: Suppose my smb.conf file in its entiretly consists of the following:
[global]
workgroup = doctest
server string = Samba %v on %h
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
security = user
map to guest = never
guest ok = no
passdb backend = tdbsam
[RECORDS]
comment = Official records
path = /company/records
guest ok = no
read only = yes
valid users = ann, bob, chet, dale
I start this server, and from the linux box type
% smbclient -L DOCTESST
Password: (I just hit <ret>)
Anonymous login successful
Domain=[DOCTEST] OS=[Unix] Server=[Samba 3.0.28a]
and then it lists the RECORDS share and IPC$ info, and the phrase "Anonymous login successful", then more server info.
According to the smb.conf man page the Guest user is the Anonymous user, so if I specify - as I do in smb.conf - No guest, why is Anonymous login successful?!?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.