You are not logged in.

#1 2014-07-21 00:52:13

josipva
Member
Registered: 2014-07-21
Posts: 29

[SOLVED] Public/Guest share (samba)

Hi.

I'm having a problem setting up public/guest share with samba. Share is visible from windows but not accessible.

smb.conf has been changed with only following lines, rest is default.

map to guest = Bad User

[Storage-josip]
    path = /mnt/C414D87114D86846/Storage/
    available = yes
    browsable = yes
    read only = no
    public = yes
    writable = yes
    printable = no
    guest ok = yes


HDD is mounted with fstab:

UUID=C414D87114D86846  /mnt/C414D87114D86846  ntfs  uid=1000,gid=1000,dmask=027,fmask=137

Does the way i mount the disk have anything to do with samba user privileges?

Last edited by josipva (2014-07-21 12:01:38)

Offline

#2 2014-07-21 07:39:12

sugartest
Member
Registered: 2014-07-09
Posts: 38

Re: [SOLVED] Public/Guest share (samba)

Hi did you check where your usb/HDD are mounted ? /mnt/UUID sounds odd to me and might cause trouble with permissions. My Arch mount removable drives in /run/media, but the way you do it is the right one, just check the path wink


An Arch Linux enthousiast and a Linux fan in general, mostly interrested in command line use, security issues, code learning and networks.

Offline

#3 2014-07-21 10:24:01

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [SOLVED] Public/Guest share (samba)

I'm not too sure on arch linux samba servers. This is from my ubuntu home network server samba:

My samba.conf

#####===== Global Settings =====#####
[global]
	dns proxy = no
	socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=131072 SO_RCVBUF=131072
	workgroup = DEBRIELLA
	os level = 20
	log file = /var/log/samba/log %m
	syslog = 0
	preferred master = yes
	unix password sync = yes
	logon drive = H
	server string = %h server Samba Ubuntu
	domain master = yes
	load printers = no
	sync always = no
	domain logons = yes
	winbind trusted domains only = yes
	winbind use default domain = yes
	passwd chat = *Enter\snew\s*\spassword * %n\n *Retype\snew\s*\spassword * %n\n *password\supdated\ssuccessfully*
	aio read size = 65536
	strict allocate = yes
	usershare allow guests = yes
	max log size = 1000
	passdb backend = tdbsam
	aio write size = 65536
	panic action = /usr/share/samba/panic-action %d
	min receivefile size = 131072
	passwd program = /usr/bin/passwd %u
	name resolve order = wins lmhost host bcast
	strict locking = auto
	logon script = logon cmd
	logon path = \\%N\%U\profile
	security = user
	obey pam restrictions = yes
	pam password change = yes
	use sendfile = true
	add machine script = sudo /usr/sbin/useradd -N -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
	public = yes
	map to guest = bad user
	wins support = true
	logon home = \\%N\%U
	path = /tmp
	encrypt passwords = yes

#####===== Share Definitions =====#####
[Homes]
   comment = Home Directories
   browseable = no
   read only = no
   create mask = 0700
   directory mask = 0700
   valid users = %S

[Shares]
   path = /shares
   browseable = yes
   read only = no
   guest ok = yes
   create mask = 0755
   directory mask = 0755
   force user = nobody
   force group = nogroup

[profiles]
   comment = Users profiles
   path = /srv/samba/profiles
   guest ok = no
   browseable = no
   create mask = 0600
   directory mask = 0700

fstab:

UUID=38a783ec-8c43-4c27-afaa-db78324b504d /shares         ext4    defaults               0    2
UUID=7d0f521c-0f83-4d90-bede-a37159acfa72 /home           ext4    defaults               0    2

My wife on her win7 desktop and win8.1 laptop can access all of the samba shares, both her private user and public shares.

Offline

#4 2014-07-21 12:01:09

josipva
Member
Registered: 2014-07-21
Posts: 29

Re: [SOLVED] Public/Guest share (samba)

Haha, found the solution. It was pretty simple. I needed to mount the hdd with "ntfs-3g" filesystem, not "ntfs" roll

Offline

#5 2014-07-21 12:42:37

sugartest
Member
Registered: 2014-07-09
Posts: 38

Re: [SOLVED] Public/Guest share (samba)

Pretty neat, I wouldn't have thought of it.


An Arch Linux enthousiast and a Linux fan in general, mostly interrested in command line use, security issues, code learning and networks.

Offline

#6 2014-07-22 13:44:52

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 324

Re: [SOLVED] Public/Guest share (samba)

[point of note]
one thing i noticed when using ntfs-3g with samba shares is large file transfers = high cpu usage.


ROG Strix (GD30CI) - Intel Core i5-7400 CPU - 32Gb 2400Mhz - GTX1070 8GB - AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820  Steam-HearThis.at-Last FM-Reddit

Offline

#7 2014-07-23 00:40:46

josipva
Member
Registered: 2014-07-21
Posts: 29

Re: [SOLVED] Public/Guest share (samba)

Yep, noticed that too... hmm

Last edited by josipva (2014-07-23 00:40:59)

Offline

Board footer

Powered by FluxBB