SMB config Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
kenpachizero
Posts: 12
Joined: Mon Jan 06, 2020 6:26 am

SMB config

Post by kenpachizero »

Hey All,

Im trying to get SMB working, I have created the users but i get access denied, i just wanted to check my SMB config

Code: Select all

[global]

	workgroup = WORKGROUP
	server string = Share
	dns proxy = no
	log file = /var/log/samba/log.%m
	max log size = 1000
	syslog only = no
	syslog = 0

	panic action = /usr/share/samba/panic-action %d

	security = user
	encrypt passwords = true
	passdb backend = tdbsam
	obey pam restrictions = yes
	unix password sync = yes
	read only = no
	null passwords = no

	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

	load printers = no
	printcap name = /dev/null
	disable spoolss = yes

[jane]
	comment = Jane's Folder
	path = /mnt/hdd/Share/Jane
	browseable = yes
	create mask = 0775
	directory mask = 0775
	valid users = Jane
	admin users = bob
	writeable = yes
	max connections = 1
	guest ok = no
	read only = yes	
[bob]
	comment = bob Master Access
	path = /mnt/hdd
	browseable = yes
	create mask = 0775
	directory mask = 0775
	valid users = bob
	invalid users = jane
	writeable = yes
	max connections = 1
	guest ok = no
	read only = yes
	
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: SMB config

Post by Joulinar »

Hi,

I tested your configuration as is and I was able to access folder for Jane as well as Bob. Writing was not possible because you have set Read Only flag on your smb.conf file

What exactly is your issue? Are you able to provide some more information? Or some screen shot?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kenpachizero
Posts: 12
Joined: Mon Jan 06, 2020 6:26 am

Re: SMB config

Post by kenpachizero »

Hi Joulinar,

Cant believe i missed that, i have removed the readonly line and rebooted but sadly get the same issue, i think it will have to do with my users.
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: SMB config

Post by Joulinar »

as I said, I was able to login and browse both SMB shares for Jane as well as Bob. So login was working using your original config file.

What exactly is your issue? Did you created user Jane and Bob before on OS level? Did you set correct password on SMB? Maybe you have some screen shot?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kenpachizero
Posts: 12
Joined: Mon Jan 06, 2020 6:26 am

Re: SMB config

Post by kenpachizero »

Hey Joulinar,

Yes i created the users, i have found some more information about them
id bob
uid=1002(bob) gid=1002(bob) groups=1002(bob),1003(hdd)
id jane
uid=1001(jane) gid=1001(jane) groups=1001(jane),1003(hdd)

lslogins bob
Username: bob
UID: 1002
Gecos field: bob,3,,
Home directory: /home/bob
Shell: /bin/false
No login: no
Primary group: bob
GID: 1002
Supplementary groups: hdd
Supplementary group IDs: 1003
Hushed: no
Running processes: 0

lslogins jane
Username: jane
UID: 1001
Gecos field: jane,1,,
Home directory: /home/jane
Shell: /bin/false
No login: no
Primary group: jane
GID: 1001
Supplementary groups: hdd
Supplementary group IDs: 1003
Hushed: no
Running processes: 0
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: SMB config

Post by Joulinar »

ok still my question you did not answered until now

> What exactly is your issue?
> Did you set correct password on SMB level?
> Maybe you have some screen shot?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kenpachizero
Posts: 12
Joined: Mon Jan 06, 2020 6:26 am

Re: SMB config

Post by kenpachizero »

Hello,

Sorry, I can't copy files to the share, I can map the share to windows but it says access is denied
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: SMB config

Post by Joulinar »

so you are able to map and you are able to browse but you are not able to create/copy files?

pls can you past output of

Code: Select all

ls -l /mnt/hdd
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kenpachizero
Posts: 12
Joined: Mon Jan 06, 2020 6:26 am

Re: SMB config

Post by kenpachizero »

total 32
drwxr-xr-x 2 dietpi hdd 4096 Jan 25 18:03 dietpi-sync
drwxr-xr-x 23 dietpi hdd 4096 Jan 12 19:25 hddbackup
drwxr-xr-x 2 dietpi hdd 16384 Oct 30 19:37 lost+found
drwxr-xr-x 4 dietpi hdd 4096 Oct 31 11:36 Media
drwxr-xr-x 4 dietpi hdd 4096 Nov 1 00:10 Share
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: SMB config

Post by Joulinar »

did you tried to set everything to 777? Because currently you have wirte permissions for user dietpi only.

Code: Select all

chmod -R 777 /mnt/hdd/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply