SAMBA permission error. Even the sudoers can't acess the directorys.

I will try to write to it with my user from the client where the share is mounted.

Code:
ls -l
total 0
drwxr-xr-x 2 tux tux 0 Jul 30 20:39 testdir
ls -l testdir/testfile
-rwxr-xr-x 1 tux tux 12 Jul 30 20:39 testdir/testfile
cat testdir/testfile
Hello World
And this is what it looks like on the server.

Code:
ls -l /media/
total 0
drwxrwxr-x. 3 root dolgozok 21 Jul 30 20:39 teszt
[root@rhel8]# ls -l /media/teszt/
total 0
drwxrwxr-x. 2 tux tux 22 Jul 30 20:39 testdir
[root@rhel8 ~]# ls -l /media/teszt/testdir/
total 4
-rw-rw-r--. 1 tux tux 12 Jul 30 20:39 testfile
[root@rhel8 ~]# cat /media/teszt/testdir/testfile
Hello World
This one.

Yes, the testshare is working now.

And i dont really get it, but if i copy-paste the exacat "code" from [testshare] to [omichron] (of course with the right path) it is working even with 775 mask.
 


This one.

Yes, the testshare is working now.

And i dont really get it, but if i copy-paste the exacat "code" from [testshare] to [omichron] (of course with the right path) it is working even with 775 mask.
I was showing there how the permissions are on the server side look of the files and directories that were created from the client on which the share was mounted. What don't you have working yet?
 
I edited my other reply because I forgot something. Which part don't you understand and the testshare is working now? You are wanting to be able to use the home directories of those other users and that doesn't work?
In my other reply i quted that part. I dont see why do i need that.

Yes. I want to able every user to browse his directory, but that is not working. Im reading the documentation on the smb.conf and trying to figure out what line is causing the presmission error.
 
I was showing there how the permissions are on the server side look of the files and directories that were created from the client on which the share was mounted. What don't you have working yet?
Ohhh, i seee. That makes sense.
Im currently working on [aderg]. (and every other users home folder)
 
For home directories of users you don't have to specifically define one for each user, I just used the example configuration file in my server. If these are users which you are trying to get a home directory working in samba, you can remove these.
Code:
[aderg]
path = /home/aderg
browseable = yes
read only = no
valid users = aderg

[hujberh]
path = /home/hujberh
browseable = yes
read only = no
public = yes
force user = hujberh
force group = hujberh
valid user = hujberh
directory mask = 0755
create mask = 0644

[perczelm]
path = /home/perczelm
browseable = yes
read only = no
valid users = perczelm

[Root]
path = /
browseable = yes
read only = yes
valid user = omichronserver


[Omichron]
comment = Ez a mindenki álltal elérhető mappa.
path = /home/Omichron
browseable = yes
read only = no
valid users = @dolgozok
force user = @dolgozok
create mask = 666
directory mask = 777
And then replace it with this.
Code:
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
Also don't forget that for each user you have to create a samba password so like this.
Code:
smbpasswd -a username
Then enter a password before that can use mount their home directory or any other share that is not public but private and needs a password for authentication.
 
For home directories of users you don't have to specifically define one for each user, I just used the example configuration file in my server. If these are users which you are trying to get a home directory working in samba, you can remove these.
Code:
[aderg]
path = /home/aderg
browseable = yes
read only = no
valid users = aderg

[hujberh]
path = /home/hujberh
browseable = yes
read only = no
public = yes
force user = hujberh
force group = hujberh
valid user = hujberh
directory mask = 0755
create mask = 0644

[perczelm]
path = /home/perczelm
browseable = yes
read only = no
valid users = perczelm

[Root]
path = /
browseable = yes
read only = yes
valid user = omichronserver


[Omichron]
comment = Ez a mindenki álltal elérhető mappa.
path = /home/Omichron
browseable = yes
read only = no
valid users = @dolgozok
force user = @dolgozok
create mask = 666
directory mask = 777
And then replace it with this.
Code:
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
Also don't forget that for each user you have to create a samba password so like this.
Code:
smbpasswd -a username
Then enter a password before that can use mount their home directory or any other share that is not public but private and needs a password for authentication.
I tryed the [homes] "code" you have wirten, it seems way more easyer, but if i use that (and the global settings) i've got another error:
Windows cant maintane connection with \\ip
You have no permission to \\ip. Ask for it from sysadmin.
 
What does your "[global]" configuration look like?
 
What does your "[global]" configuration look like?
Code:
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = yes
read only = No
inherit acls = Yes

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
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
This is how my smb.conf looks like. I copyed the [global] from the original smb.conf.
 
That doesn't look like it would cause the homes for home directories to not work since it's global and has nothing to do with the shares. Can you try place this after global and then restart the samba service?
 
That doesn't look like it would cause the homes for home directories to not work since it's global and has nothing to do with the shares. Can you try place this after global and then restart the samba service?
Okay, i put the [homes] after the [global] and restarted the smbd.service. Nothing changed.
 
I just booted up my Windows 10 system and having the same issue their while on my Linux client I can mount my homedir with no issue so it must be a Windows thing or something like that will see if I can get it working.
 
I just booted up my Windows 10 system and having the same issue their while on my Linux client I can mount my homedir with no issue so it must be a Windows thing or something like that will see if I can get it working.
Man, i really appreciate what you have done for me today. Really thanks for your time and patience.
I feel like i have to go to sleep, but i think i should just read the documentation on samba.org.
 
I got it working with the homes configuration which I shared with you, this is what I did in Windows to open the samba home directory of a user.
1. Open File Explorer
2. Right click on "This PC"
3. Select "Add Network Location", then "Choose a custom network location" and click next.
4. Enter the ip adress or hostname of your server with the username as share, for me it looks like this.
Code:
\\11.22.13.15\tux
5. Click Next, Next and Finish.
6. The samba home directory of that user should then open, when you then go to the fileexplore it should show up there as well.
There might me a better way to mount the share through Windows but Windows isn't my area maybe @dcbrown73 has a better and easier option for that.
 

Attachments

  • 2021-07-30_21_37_08.png
    2021-07-30_21_37_08.png
    52.4 KB · Views: 288
  • 2021-07-30_21_37_21.png
    2021-07-30_21_37_21.png
    35.4 KB · Views: 283
Man, i really appreciate what you have done for me today. Really thanks for your time and patience.
I feel like i have to go to sleep, but i think i should just read the documentation on samba.org.
Glad to help someone out who is willing to learn! :)
 
I got it working with the homes configuration which I shared with you, this is what I did in Windows to open the samba home directory of a user.
1. Open File Explorer
2. Right click on "This PC"
3. Select "Add Network Location", then "Choose a custom network location" and click next.
4. Enter the ip adress or hostname of your server with the username as share, for me it looks like this.
Code:
\\11.22.13.15\tux
5. Click Next, Next and Finish.
6. The samba home directory of that user should then open, when you then go to the fileexplore it should show up there as well.
There might me a better way to mount the share through Windows but Windows isn't my area maybe @dcbrown73 has a better and easier option for that.
Yeah, i added it like your method, but it stil not working, even if im manualy typing the ip and the username too.
 
Yeah, i added it like your method, but it stil not working, even if im manualy typing the ip and the username too.
Are you using forward slashes or backward slashes when entering the path because you have to use backward slashes in Windows.
This doesn't work
//11.22.13.15/tux
This does work.
\\11.22.13.15\tux
 
Are you using forward slashes or backward slashes when entering the path because you have to use backward slashes in Windows.
This doesn't work

This does work.
Yap, i didnt do a typo this time.
1627674499802.png

This is a screanshot from the error message. (
 

Attachments

  • 1627674431212.png
    1627674431212.png
    1,002 bytes · Views: 283
I don't see it being an issue with your samba configuration because you are able to mount other shares that are not home directories. So I think it's a Windows thing that we might be missing, Windows is not really my thing so I have no idea but found it strange since I am able to mount the users homedir. I'm using a different distribution and have a different global so that might be something, let me see if I can find something useful.
 

Members online


Top