LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2014, 10:43 AM   #1
garfy
LQ Newbie
 
Registered: Jan 2014
Posts: 4

Rep: Reputation: Disabled
Samba shares with one non-password and 1 password protected dir


I'm trying to share 2 folders for all users without a password or login (sharelive and client), an another map should be shared with a login protection (bibliotheek)
How can I adjust my smb.conf for this?

This is my smb.conf file:
[global]
workgroup = My_DOM
netbios name = bacchus
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
guest account = nobody
null passwords = true
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
create mask = 0644
directory mask = 2777

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no

[client]
path = /media/client-partition/client
browseable = yes
writable = yes
guest ok = yes
available = yes
create mask = 0777
directory mask = 0777
force user = intranet
force group = intranet
[bibliotheek]
path = /var/www/bibliotheek/documenten
browseable = yes
writable = yes
guest ok = yes
available = yes
create mask = 0777
directory mask = 0777
force user = intranet
force group = intranet
valid users = bibliotheek
[sharelive]
path=/media/client-partition/sharelive
browseable=yes
writable=yes
guest ok=yes
available=yes
create mask=0777
directory mask=0777
force user=intranet
force group=intranet
 
Old 02-11-2014, 12:49 PM   #2
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
so to try to understand this.

are you wanting guest access read only and the login user will have read/write?
 
Old 02-11-2014, 07:38 PM   #3
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
Take out the guest ok linee on the share you want password protected and don't set permissions to 777 on the share. Use something like 760

Last edited by ericson007; 02-11-2014 at 07:39 PM.
 
Old 02-12-2014, 03:42 AM   #4
garfy
LQ Newbie
 
Registered: Jan 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
I am trying to share the maps client and sharelive to all users without the use of a password.
The map bibliotheek should be shared with only one user: bibliotheek.

I removed the guest ok line ...

I did smbpasswd -a bibliotheek and smbpasswd -e bibliotheek but when I'm trying to use: net use z: \\<myip>\bibliotheek /user:bibliotheek <mypass>
I get the next error:
System error 1326 has occurred.

Logon failed: unknown user name or bad password.
 
Old 02-12-2014, 03:06 PM   #5
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
are the date and time on both computers set correctly?
 
Old 02-13-2014, 02:43 AM   #6
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
Is the bibliotheek user added to the samba host as well?

If not use

Code:
#useradd bibliotheek
Then the smbpasswd command
 
  


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
[SOLVED] problem with password protected samba-share GTCG Linux - Newbie 3 05-15-2013 05:50 PM
[SOLVED] Samba shares - 1 with no password, 1 with a password, help me set it up xmrkite Linux - Software 13 01-26-2013 05:42 PM
samba password protected share Gil@LQ Linux - Server 4 02-07-2012 04:26 AM
[SOLVED] SAMBA sharing one no public folder password protected infoslaw Linux - Newbie 8 12-30-2011 05:07 AM
Samba password protected shared Folder Mrpeepers310 Linux - Networking 5 09-18-2010 11:04 AM


All times are GMT -5. The time now is 03:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration