3

Ok, I have smb configured on my Centos 6.7 environment, I have added the user root with smbpasswd -a and when I browse to the share from my windows box I connect with the samba root user I created a password for, but I don't have linux root permissions when I click on the directories. As you can see below, I want to have access to /. Here is the config:

[Daze]
comment = Default connect
path = /
valid users = admin root 
force user = root
force group = root
browsable = yes
admin users = root, root
public = yes
writable = yes
create mask = 0777
read only = No
directory mode = 0777

Thanks in advance for your help!

2
  • This is a unwise, which is why there are votes to close the question. Opening Samba write access to the root partition is a significant security risk. It is certainly possible, and if you google samba share root partition should get your answer.
    – tomjedrz
    Dec 18, 2020 at 21:24
  • It is not unwise if it's in a properly secured local network.
    – NickSoft
    Jan 24, 2022 at 12:37

1 Answer 1

4

Arguments for the valid users parameter must be comma-separated. Also, notice that you typed "writable" instead of writeable. And, because writeable is the inverted synonym of read only, there's no need to declare the read only parameter.

Here's the correct config:

[Daze]
comment = Default connect
path = /
valid users = admin, root 
force user = root
force group = root
browseable = yes
writeable = yes
admin users = root
public = yes
create mask = 0777
directory mask = 0777

Restart your Samba server (run e.g. sudo service smbd restart or sudo systemctl restart smbd.service) with these configs and see if it works.

4
  • 1
    I just tried this but it didn't work for my uses Any other ideas? [Daze] comment = Default connect path = / valid users = admin, root force user = root force group = root browsable = yes writeable = yes admin users = root public = yes create mask = 0777 directory mask = 0777 Nov 12, 2017 at 19:03
  • @VickyPenny Try setting your shared folder in your smb.conf file with these parameters (replace each ; character with a line break and don't forget to restart the Samba server after saving the changes you did in your smb.conf file): [Shared];path = /;comment = My shared folder;admin users = root;available = yes;browseable = yes;create mask = 0777;directory mask = 0777;force group = root;force user = root;guest ok = no;locking = yes;printable = no;public = yes;root = /;strict locking = no;valid users = root;writeable = yes;write list = root Nov 14, 2017 at 1:51
  • With out knowing what config file we are editing this information is useless to a newbie. Jun 17, 2022 at 16:47
  • @wheredidthatnamecomefrom The question was made / presented under the premise that the user alreay has "smb configured" (sic) on its Linux "environment", which implies that such user isn't a newbie (or is, but yet knows where the config file is located and what its structure is). Anyway: on most Linux distributions (CentOS Linux included), the Samba config file is smb.conf and its located at /etc/samba/. If updatedb is available on the Linux distribution, running sudo updatedb and then locate -i smb.conf provides the current location of all smb.conf files on such Linux system. Jun 17, 2022 at 17:16

Not the answer you're looking for? Browse other questions tagged .