LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-12-2009, 01:30 PM   #1
jmoody
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Rep: Reputation: 15
samba not requiring a password


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
 
Old 03-12-2009, 02:19 PM   #2
miedward
Member
 
Registered: Feb 2007
Distribution: RHEL 4, SOLARIS 10
Posts: 91

Rep: Reputation: 15
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.
 
Old 03-16-2009, 08:40 AM   #3
jmoody
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Original Poster
Rep: Reputation: 15
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?!?
 
  


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
Lock screen (requiring password to unlock) when resuming from suspend theoldman Linux - Laptop and Netbook 2 12-17-2009 09:35 PM
After changing Windows AD password Samba\Winbind still uses old password Criller Linux - Security 2 02-28-2008 04:14 AM
sudo not requiring password sbammel Linux - Security 4 07-24-2007 12:48 AM
How do I remount a network SMB share (on reboot) requiring a username & password BuckRogers01 Linux - Networking 1 07-09-2005 11:53 AM
requiring root password for app access? mysticpain Linux - Software 3 06-08-2004 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:17 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