LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-25-2020, 04:26 AM   #1
riddertommie
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Rep: Reputation: Disabled
Samba only works for sudo's


I'm banging by head on the table ant can not find it.

I'm using ubuntu 20 and a have the following samba.conf

[global]
unix charset = UTF-8
workgroup = WORKGROUP
security = user
interfaces = 127.0.0.0/8 192.168.2.0/24 enp2s0
host allow = 192.168.2.0/24
host deny = ALL
acl allow execute always = Yes
allow insecure wide links = yes
veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
delete veto files = yes

[raid0]
path = /mnt/raid0
valid users = user1
comment = Raid5
browseable = yes
writeable = no
printable = no
guest ok = no
read only = no
create mask = 777

[user2]
path = /mnt/raid0/Users/user2
valid users = user2
comment = Homedir user2
browseable = yes
writeable = yes
printable = no
guest ok = no
read only = no
create mask = 777

User1 who has sudo rights and can acces everything but user2 cant acces anything.

/mnt/raid0/Users/user2 > drwxrwx--- 2 1002 1002 4096 May 13 15:55 user2

I don't think its a problem with the directory rights but with the rights of the drive or the mount, but i cant find what it is

/etc/fstabs > /dev/md0 /mnt/raid0 ext4 defaults 0 0

Any tips? hints?

Thanks!
 
Old 08-25-2020, 04:48 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Is 1002 the correct user/group ID? Shouldn't user2 be a Linux account on that server?
 
Old 08-25-2020, 08:06 AM   #3
riddertommie
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Yes It's the correct ID and no user2 does not have to have a Linux account but i want to restrict access to files so i think i have to. (user2 only has to see his/here directory/files and not the complete Harddisk array).
 
Old 08-25-2020, 09:40 AM   #4
rpenny
Member
 
Registered: Jul 2019
Posts: 83

Rep: Reputation: Disabled
Quote:
Originally Posted by riddertommie View Post
Yes It's the correct ID and no user2 does not have to have a Linux account but i want to restrict access to files so i think i have to. (user2 only has to see his/here directory/files and not the complete Harddisk array).
Oh, yes he does, the underlying OS has no idea who '1002' is, that is why it is showing up as a number and not a name.
 
Old 08-25-2020, 10:07 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The problem is, even if you succeed in logging on as user2, you have no access rights for /mnt/raid0/Users/user2, since the directory is owned by a different user.

Last edited by berndbausch; 08-25-2020 at 10:11 AM.
 
Old 08-26-2020, 09:47 AM   #6
riddertommie
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
-,- can it be that simple? I'm looking at this the whole week now.

i will try as soon as I'm at home.

Thanks!

Last edited by riddertommie; 08-26-2020 at 02:07 PM.
 
Old 08-31-2020, 06:51 AM   #7
riddertommie
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by riddertommie View Post
-,- can it be that simple? I'm looking at this the whole week now.

i will try as soon as I'm at home.

Thanks!
It works, Thanks for the extra pair of eyes
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSSD does not receive sudo rules from Samba (but ldapsearch works) teekeino Linux - Server 2 08-17-2014 09:02 PM
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
b43 firmware installed , still only works after sudo modprobe b43 command issued modo505 Linux - Wireless Networking 4 07-31-2011 08:18 PM
[SOLVED] sudo: umount works, mount not works sasser Slackware 3 07-09-2010 03:01 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration