View previous topic :: View next topic |
Author |
Message |
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Oct 12, 2020 4:52 pm Post subject: [solved] CIFS mount owned by fakeuser wheel |
|
|
I want to share my documents across all my workstations, but am having problems.
Instead of user group "tony tony" I'm getting "fakeuser wheel"
I've had several errors that I fixed by googling the error message but there is no error message here, just strange ownership and readonly mount
Samba 4.11.13 both sides.
server's /etc/samba/smb.conf: Code: | # Global parameters
[global]
bind interfaces only = Yes
deadtime = 15
dns proxy = No
interfaces = eth0
log file = /var/log/samba/log.%a
map to guest = Bad User
max xmit = 65535
name resolve order = lmhosts host bcast
ntlm auth = ntlmv1-permitted
os level = 255
preferred master = Yes
security = USER
server max protocol = SMB2
server min protocol = NT1
server string = Trantor Central Server
workgroup = GREENGABLES
idmap config * : backend = tdb
guest ok = Yes
hosts allow = 192.168.0. 127.
hosts deny = 0.0.0./0
[non-video]
comment = Public File Sharing Area
create mask = 0755
force group = video
force user = guest
path = /home/samba/public
read only = No
[Documents]
acl allow execute always = Yes
comment = Central System Common Document Area
create mask = 0775
directory mask = 0775
force group = tony
hosts allow = 192.168.0.96/27 127.
path = /home/tony/Documents
read only = No
valid users = @tony
[data]
acl allow execute always = Yes
comment = Central System Common Data Area
create mask = 0777
directory mask = 0007
force user = nobody
hosts allow = 192.168.0.96/27 127.
path = /data
read only = No
[video]
create mask = 0755
path = /video
read only = No
[distfiles]
acl allow execute always = Yes
comment = Central System Portage Distfiles
create mask = 0644
directory mask = 0007
force user = portage
hosts allow = 192.168.0.96/27 127.
path = /usr/portage/distfiles
read only = No
|
Cifs mounts line from /etc/fstab
Code: | //trantor/video /mnt/trantor-video cifs vers=1.0,users,user=guest,password=none,rw 0 0
//trantor/data /mnt/trantor-data cifs auto,vers=1.0,users,user=guest,password=none,rw 0 0
//trantor/Documents /home/tony/Documents cifs vers=1.0,users,user=tony,password=myrealpassword,rw 0 0 |
Last edited by Tony0945 on Tue Oct 13, 2020 12:30 am; edited 1 time in total |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6222 Location: Dallas area
|
Posted: Mon Oct 12, 2020 5:06 pm Post subject: |
|
|
I set "guest account" to my user name, in smb.conf, then all guest connections leave files with my user/group, but it's a global setting (I think) _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Oct 12, 2020 5:32 pm Post subject: |
|
|
Like this? Code: | guest account = tony
| Didn't change anything. Yes, I restarted samba on the server then unmounted and mounted on the client |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Oct 12, 2020 6:47 pm Post subject: |
|
|
Ah! I found a complication.
On the server:
Code: | grep tony /etc/group
...
tony:x:1005: |
On one client:
Code: |
grep tony /etc/group
...
tony:x:1002: |
And on the other:
Code: |
grep tony /etc/group
...
tony:x:1000: |
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Oct 13, 2020 12:39 am Post subject: |
|
|
The complication was the problem! I thought user tony was 1000 everywhere. It's not.
I this procedure https://www.cyberciti.biz/faq/linux-change-user-group-uid-gid-for-all-owned-files/ to change owner & group "tony" to 2000
on both the server and the client I was working on. After rebooting both, the ownership of the mounted files is tony:tony, not fakeuser:wheel
I felt a bit like zaphod Beeblebrox doodling on his own brain, but it seems to work.
The second workstation has virtualbox and I'm a little afraid of screwing that up.
BTW, be sure to unmount your CIFS shares before changing files. The best way is to shut down the samba service on the server.
I did this from a root VT on Mate, but it would have been better to have printed out the instructions then shutdown X ("service xdm stop" in my case)
EDIT: I've griped about the new account and group ebuilds, but I see their value now. It's best that those users and groups be uniform across the LAN. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6222 Location: Dallas area
|
Posted: Tue Oct 13, 2020 9:35 am Post subject: |
|
|
When I use the same id on multiple system (under my control) I've always made sure to set the user/group ids the same. And all that before acct-* _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|