LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-18-2007, 11:15 AM   #1
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
Samba - Mixed guest and login shares


I'm trying to configure a samba server to allow login without a credentials prompt for some users, yet allow others only via a valid login.

Here's my smb.conf file:

<code>

[global]
workgroup = MYGROUP
server string = Linux Server
netbios name = Server
log level = 0
log file = /var/log/samba/%m.log
max log size = 50
read only = No
cups options = raw
delete readonly = Yes
security = user
read raw = Yes
write raw = Yes
oplocks = Yes
max xmit = 65535
getwd cache = Yes
stat cache = No
deadtime = 3
hosts allow =
hosts deny =
dns proxy = No
max connections = 30
map to guest = bad user

[printers]
comment = All Printers
path = /usr/spool/samba
writable = Yes
guest ok = Yes
printable = Yes
browseable = Yes
public = Yes

[archive]
comment = Non Backup Up Area - Archive
path = /archive
read only = no
guest ok = Yes
force user = general
force group = users
admin users = nobody

[public]
comment = Backed Up Public Area
path = /common/public
read only = No
guest ok = Yes
force user = general
force group = users
admin users = nobody

[accounts]
comment = Backed Up Accounts Area
path = /common/accounts
read only = No
guest ok = No
force user = general
force group = users
valid users = @accounting

</code>

Here's my issue.

Using the above, the "archive" and "public" folders are accessible, but users have to login first as "guest". I need to ensure that no credentials need to be supplied at this point.

If I change to "security = share", then users are not asked for credentials and can access the "archive" and "public" areas. However, when trying to access the "accounts" share, valid users (i.e. in the group "accounting") are asked for a password, but the username is fixed as "server/guest". Hence they can't login.

Anyone have any ideas on how to get the best of both? i.e. guest users not asked for credentials, but valid users being able to login with username other than "guest"?

Regards,

Carl.

Last edited by carlmarshall; 04-19-2007 at 03:12 AM.
 
Old 04-19-2007, 03:45 AM   #2
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Original Poster
Rep: Reputation: 16
In case anyone is interested, the answer seems to be:

security = user
usershare allow guests = yes

This allows a guest login without asking for credentials yet the secured area requests both username and password.

Carl.
 
Old 04-19-2007, 09:30 AM   #3
BethR
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
>>>In case anyone is interested, the answer seems to be...

Thanks for posting this. I'm very interested, as I've been struggling with figuring this out. Decided to do one more search before starting a new thread and found your answer.

Do you mind if I ask where you found the info? I've looked through all the Samba doc, searched forums, etc., but had apparently just missed the answer every time I looked at it.

Thanks!
 
Old 04-19-2007, 11:39 AM   #4
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Original Poster
Rep: Reputation: 16
BethR,

Didn't manage to find it anywhere, just spent hours & hours & hours & h.....

Still, got there in the end.

Carl.
 
Old 04-19-2007, 09:23 PM   #5
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Very helpful! I was trying to implement something like this the other day for my users to access a public drive, but gave up on it when I had the exact same problem as you. I'll give this a try! Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Automatic mapping of Samba shares at login on Fedora chaan Linux - Software 2 05-14-2004 11:43 AM
Samba - guest login problem cferthorney Linux - Networking 0 05-09-2004 03:15 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 02:23 PM
guest accesible shares on samba server Scrotonomous Linux - Newbie 4 01-02-2003 05:27 PM

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

All times are GMT -5. The time now is 01:14 AM.

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