You are not logged in.

#1 2016-06-18 18:58:14

fajung
Member
From: Argentina, Buenos aires
Registered: 2016-05-28
Posts: 16

howto allow anonymous access to samba [Solved]

I recently installed Arch, because and HDD failure, in my broken HDD I had eOS Freya, with Samba set up, now in Arch I can't get samba set up as I used to had in eOS Freya, I copy the old samba(smb.conf) to my Arch:

#OpenWrt template
[global]
        netbios name = Archlinux
        display charset = UTF-8
#     interfaces = 127.0.0.1/8 lo 192.168.0.3/24 enp2s0
 	interfaces = enp2s0 # <= ip link for my network :192.168.0.3 my Ip local address
        server string = Archlinux Samba
        unix charset = UTF-8
        workgroup = WORKGROUP
        browseable = yes
        deadtime = 30
        domain master = yes
        encrypt passwords = true
        enable core files = no
        guest account = nobody
        guest ok = yes
        invalid users = root
        local master = yes
        load printers = no
        map to guest = Bad User
        max protocol = SMB2
        min receivefile size = 16384
        null passwords = yes
        obey pam restrictions = yes
        os level = 20
        passdb backend = smbpasswd
        preferred master = yes
        printable = no
        security = user
        smb encrypt = disabled
        smb passwd file = /etc/samba/smbpasswd
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
        syslog = 2
        use sendfile = yes
        writeable = yes

#	wins support = yes
#	name resolve order = wins lmhosts hosts bcast
	

[Peliculas]
	path = /home/fajung/Vídeos/Movies
	browsable = yes
	valid users = fajung nobody
	read only = no
	guest ok = yes
	create mask = 0777
	directory mask = 0777

[Música]
	path = /home/fajung/Música
	browsable = yes
	valid users = fajung
	read only = no
	guest ok = no
	create mask = 0640
	directory mask = 0750

I added my user to samba "smbpasswd -a fajung" but I don't remember if I have to add nogroup or nobody to somewhere
I don't remember how I set it up in the other system, it was long time ago. I check on Samba Wiki but at this point I could be missing something just in front of my eyes.

I need to allow anonymous (nobody I think) access because I use to access to it from a Windows 7, and to make it easy access

Last edited by fajung (2016-06-29 00:52:29)

Offline

#2 2016-06-18 19:07:58

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: howto allow anonymous access to samba [Solved]

You could try nfs instead it's simpler and doesn't have authentication by default.

Last edited by teateawhy (2016-06-18 19:08:17)

Offline

#3 2016-06-18 23:40:07

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: howto allow anonymous access to samba [Solved]

Here is a good article describing how to do it.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#4 2016-06-29 00:14:17

fajung
Member
From: Argentina, Buenos aires
Registered: 2016-05-28
Posts: 16

Re: howto allow anonymous access to samba [Solved]

I've tried everythinng, (well ovbiously not everythinng) but I can't get it right

this is the output for the testparm -S:

[root@Archlinux samba]# testparm -S
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
WARNING: The "null passwords" option is deprecated
Processing section "[Peliculas]"
Processing section "[Música]"
Processing section "[Public Share]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
	enable core files = No
	interfaces = 127.0.0. 192.168.0.
	server string = Aaaaaaaaaaaaaaaaahhhhhhhhhhh!!!
	domain master = Yes
	preferred master = Yes
	syslog = 2
	usershare allow guests = Yes
	usershare max shares = 100
	usershare path = /var/lib/samba/usershare
	load printers = No
	name resolve order = wins lmhosts hosts bcast
	server max protocol = SMB2
	map to guest = Bad User
	null passwords = Yes
	obey pam restrictions = Yes
	passdb backend = smbpasswd
	security = USER
	smb passwd file = /etc/samba/smbpasswd
	deadtime = 30
	wins support = Yes
	idmap config * : backend = tdb
	guest ok = Yes
	invalid users = root
	smb encrypt = if_required
	use sendfile = Yes


[Peliculas]
	path = /home/fajung/Vídeos/Movies
	create mask = 0777
	directory mask = 0777
	valid users = fajung nobody


[Música]
	path = /home/fajung/Música
	create mask = 0644
	valid users = fajung nobody


[Public Share]
	path = /home/fajung/Warehouse

I just installed samba, do I install somthing else smbclient is on, I added my user to samba password.

I don' want to force a user to map it to my user, because later on I'm going to restric access to a folder. I've tried to uninstall samba, to start all over again, but pacman didn't unistall it, to many dependecies with samba, so I deleted the /etc/samba folder, an copy my old smb.conf file, but I can't get in, without user & password, Anonimously or no login can't get in.

all the shared folder have a 0777 permissions

PS: I replace my smb.conf file with this one: Sample configuration and returned error when I tried to restart smbd nmbd
-


EDIT: I solved it, all the folder that I wanned to share, were under /home/fajung/... my userfolder and the permission were 0700, so it was unreachable for any one but me, I chmod it to 755 and now I can't access to it from other machine without login

Last edited by fajung (2016-06-29 00:51:37)

Offline

#5 2016-06-29 00:53:37

ymf331
Banned
Registered: 2015-04-18
Posts: 9

Re: howto allow anonymous access to samba [Solved]

to uninstall a program and its deps, pacman -Rs
i'm guessing the 0777 thing means umask 077 when you created the directory? seems weird for a shared one to make it only readable for the user who created it.


i can't put this zsh config on the forum: http://dotshare.it/dots/1144/

Offline

Board footer

Powered by FluxBB