REVISED Help on Share Groups for Samba Debian 9.6

New to Debian (Or Linux in general)? Ask your questions here!

REVISED Help on Share Groups for Samba Debian 9.6

Postby TopJan » 2018-12-10 15:26

First I will say that I am a total newbie concerning Linux.
What I have done so far: installed Debian 9.6, installed drivers, certain utilities such as sudo, samba, nano, clamav e.t.c.

This "server" will be used as file share in a Windows network for a non-profit organisation.
It has a drive partitioned for operating system and two other drives, one is called SHARE and the other is BACKUP. All three drives have only one partition each, made in Debian setup with ext4 file format.

After installing Samba and the needed dependancies I first made a tutorial teaching me the basics on sharing in Linux. Learned about editing smb.config , groups, restarting the smbd service ...

My challenge is this: although I have succesefully made the tutorial working (I was able to acces and edit folders from a Win machine using username/password in the share made on users files in the OS partition) I have failed in setting a more advanced share (sharing from sdb1 that is mounted as /media/SHARE/foldername ).

Partly I think a problem resides in the way new folders intended for sharing are created in Linux and partly in the way I have to set smb.config.

I have (on paper) a total of 20 users (I have already created them, only gave 3 passwords and activated it atm), I did not set a password for each in Debian, I only activated with password (a and e) for Samba and then added certain users to certain groups.
Problem is I have created the tree file structure (there are 7 primary subfolders and about 18 additional subfolders scattered among those 7) in the Debian File Explorer and from my understanding these folders are not browsable by default in Samba share and I do not know how to create each with correct rights because some folders have multiple users/groups assigned...

I failed to find a proper tutorial on how to manage this and I even read about an app called Webmin that presumably helps me with this task in a GUI.

Please help if possible, thank you in advance, I am sure some have encountered this challenge and know how to do it.

Also, if this will be resolved easy, please advise on how to make a independent backup on my third partition sdc1 mounted as /media/BACKUP/foldername

To get into detail:
my smb.conf looks like this:
Code: Select all
​workgroup = WORKGROUP
​server string = SHARE
​netbios name = SHARE
server role = standalone server
​security = user
​map to guest = bad user
​dns proxy = no
local master = yes
preferred master = yes
log file = /var/log/samba/log.%m
max log size = 10000
syslog = 0

#### SHARES ####
    path = /media/root/SHARE/share/SHARED/
    read only = no
    writeable = yes
    browseable = yes
    valid users = @shared

I tried adding
create mask = 0640
directory mask = 0750
but I still cannot acces the share.

my shared folder is like this:
Code: Select all
# ls -l /media/root/SHARE/share/SHARED/
total 28
drwxrwxrw- 8 razvan shared 4096 Dec  7 07:56 CONTAB
drwxrwxrw- 2 razvan shared 4096 Dec  7 07:55 DIVERSE
drwxrwxrw- 5 razvan shared 4096 Dec  7 07:58 GESTIUNE
drwxrwxrw- 2 razvan shared 4096 Dec  7 07:54 MARKET
drwxrwxrw- 6 razvan shared 4096 Dec  7 07:57 RU
drwxrwxrw- 5 razvan shared 4096 Dec  7 07:57 TEHNIC
drwxrwxrw- 8 razvan shared 4096 Dec  7 07:57 VANZARI

my pdbedit -w -L
Code: Select all
# pdbedit -w -L
Unknown parameter encountered: "​workgroup"
Ignoring unknown parameter "​workgroup"
Unknown parameter encountered: "​server string"
Ignoring unknown parameter "​server string"
Unknown parameter encountered: "​netbios name"
Ignoring unknown parameter "​netbios name"
Unknown parameter encountered: "​security"
Ignoring unknown parameter "​security"
Unknown parameter encountered: "​map to guest"
Ignoring unknown parameter "​map to guest"
Unknown parameter encountered: "​dns proxy"
Ignoring unknown parameter "​dns proxy"
elena:1001:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:429EB1257C3D88ACE9A4CA634E864965:[U          ]:LCT-5C0A69CE:

and finally my cut -d: -f1 /etc/passwd | xargs groups
Code: Select all
# cut -d: -f1 /etc/passwd | xargs groups
root : root
daemon : daemon
bin : bin
sys : sys
sync : nogroup
games : games
man : man
lp : lp
mail : mail
news : news
uucp : uucp
proxy : proxy
www-data : www-data
backup : backup
list : list
irc : irc
gnats : gnats
nobody : nogroup
systemd-timesync : systemd-timesync
systemd-network : systemd-network
systemd-resolve : systemd-resolve
systemd-bus-proxy : systemd-bus-proxy
_apt : nogroup
dnsmasq : nogroup
messagebus : messagebus
avahi : avahi
lightdm : lightdm
selardor : selardor
sshd : nogroup
clamav : clamav
colord : colord
elena : shared
uuidd : uuidd
razvan : shared
cristian : shared
adi : vanzari
vali : subsales
sorin : subsales
ionut : subsales market
carmen : contab
gabi : subcontab
cristi : subcontab
paula : paula
lili : ru
mircea : market
iulia : market
laurentiu : laurentiu tehnic
stefanut : stefanut tehnic
marian : marian
danut : danut
gestionar : gestionar gestiune

My Windows PC sees the SHARE, asks for user/password and after providing one from @shared is lists the ALL folder. When trying to access it I get: Windows cannot access \\share\ALL You do not have permission to access ...

Any help would be appreciated.

Posts: 2
Joined: 2018-12-10 15:00

Return to Beginners Questions

Who is online

Users browsing this forum: Bloom, esalvesen and 13 guests