Allow root only to edit shared folder in samba
up vote
0
down vote
favorite
I am using below to allow root user to have full access to the samba shared by entering the password, however, it showing not accessible. What I want is that to the Website share the root user should full access and others shouldn't (no guest)
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[Website]
path = /var/www/html/
create mask = 0755
directory mask = 0755
writable = yes
browseable = yes
force user = root
valid users = root
linux samba
New contributor
add a comment |
up vote
0
down vote
favorite
I am using below to allow root user to have full access to the samba shared by entering the password, however, it showing not accessible. What I want is that to the Website share the root user should full access and others shouldn't (no guest)
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[Website]
path = /var/www/html/
create mask = 0755
directory mask = 0755
writable = yes
browseable = yes
force user = root
valid users = root
linux samba
New contributor
Your smb.conf is not clear, and rules are missing. Check here: wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
– ajcg
Nov 23 at 13:13
@ajcg the share works, I only want root should have access to Website shared folder. I don't have problem in sharing, it is only the website shared folder which I want to be secured and accessed through root user only with password.
– ARH
Nov 23 at 13:51
It's not clear. To protect the folder /var/www/html/folder_to_website you only need to put a passwd in apache or nginx, etc, (from 'root' if you only want 'root' access). Example: htpasswd -c /etc/apache2/.htpasswd $USER && apache2ctl configtest. And if you want to share the same folder in samba is for other users to have access to it, then only put which users will have access permission (valid users = foo or admin users = root ....) and set chmod / chown -R root:root /path_to_ folder
– ajcg
Nov 23 at 14:27
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using below to allow root user to have full access to the samba shared by entering the password, however, it showing not accessible. What I want is that to the Website share the root user should full access and others shouldn't (no guest)
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[Website]
path = /var/www/html/
create mask = 0755
directory mask = 0755
writable = yes
browseable = yes
force user = root
valid users = root
linux samba
New contributor
I am using below to allow root user to have full access to the samba shared by entering the password, however, it showing not accessible. What I want is that to the Website share the root user should full access and others shouldn't (no guest)
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[Website]
path = /var/www/html/
create mask = 0755
directory mask = 0755
writable = yes
browseable = yes
force user = root
valid users = root
linux samba
linux samba
New contributor
New contributor
edited Nov 23 at 12:12
Jeff Schaller
36.9k1052121
36.9k1052121
New contributor
asked Nov 23 at 9:45
ARH
1092
1092
New contributor
New contributor
Your smb.conf is not clear, and rules are missing. Check here: wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
– ajcg
Nov 23 at 13:13
@ajcg the share works, I only want root should have access to Website shared folder. I don't have problem in sharing, it is only the website shared folder which I want to be secured and accessed through root user only with password.
– ARH
Nov 23 at 13:51
It's not clear. To protect the folder /var/www/html/folder_to_website you only need to put a passwd in apache or nginx, etc, (from 'root' if you only want 'root' access). Example: htpasswd -c /etc/apache2/.htpasswd $USER && apache2ctl configtest. And if you want to share the same folder in samba is for other users to have access to it, then only put which users will have access permission (valid users = foo or admin users = root ....) and set chmod / chown -R root:root /path_to_ folder
– ajcg
Nov 23 at 14:27
add a comment |
Your smb.conf is not clear, and rules are missing. Check here: wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
– ajcg
Nov 23 at 13:13
@ajcg the share works, I only want root should have access to Website shared folder. I don't have problem in sharing, it is only the website shared folder which I want to be secured and accessed through root user only with password.
– ARH
Nov 23 at 13:51
It's not clear. To protect the folder /var/www/html/folder_to_website you only need to put a passwd in apache or nginx, etc, (from 'root' if you only want 'root' access). Example: htpasswd -c /etc/apache2/.htpasswd $USER && apache2ctl configtest. And if you want to share the same folder in samba is for other users to have access to it, then only put which users will have access permission (valid users = foo or admin users = root ....) and set chmod / chown -R root:root /path_to_ folder
– ajcg
Nov 23 at 14:27
Your smb.conf is not clear, and rules are missing. Check here: wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
– ajcg
Nov 23 at 13:13
Your smb.conf is not clear, and rules are missing. Check here: wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
– ajcg
Nov 23 at 13:13
@ajcg the share works, I only want root should have access to Website shared folder. I don't have problem in sharing, it is only the website shared folder which I want to be secured and accessed through root user only with password.
– ARH
Nov 23 at 13:51
@ajcg the share works, I only want root should have access to Website shared folder. I don't have problem in sharing, it is only the website shared folder which I want to be secured and accessed through root user only with password.
– ARH
Nov 23 at 13:51
It's not clear. To protect the folder /var/www/html/folder_to_website you only need to put a passwd in apache or nginx, etc, (from 'root' if you only want 'root' access). Example: htpasswd -c /etc/apache2/.htpasswd $USER && apache2ctl configtest. And if you want to share the same folder in samba is for other users to have access to it, then only put which users will have access permission (valid users = foo or admin users = root ....) and set chmod / chown -R root:root /path_to_ folder
– ajcg
Nov 23 at 14:27
It's not clear. To protect the folder /var/www/html/folder_to_website you only need to put a passwd in apache or nginx, etc, (from 'root' if you only want 'root' access). Example: htpasswd -c /etc/apache2/.htpasswd $USER && apache2ctl configtest. And if you want to share the same folder in samba is for other users to have access to it, then only put which users will have access permission (valid users = foo or admin users = root ....) and set chmod / chown -R root:root /path_to_ folder
– ajcg
Nov 23 at 14:27
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
ARH is a new contributor. Be nice, and check out our Code of Conduct.
ARH is a new contributor. Be nice, and check out our Code of Conduct.
ARH is a new contributor. Be nice, and check out our Code of Conduct.
ARH is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483637%2fallow-root-only-to-edit-shared-folder-in-samba%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Your smb.conf is not clear, and rules are missing. Check here: wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
– ajcg
Nov 23 at 13:13
@ajcg the share works, I only want root should have access to Website shared folder. I don't have problem in sharing, it is only the website shared folder which I want to be secured and accessed through root user only with password.
– ARH
Nov 23 at 13:51
It's not clear. To protect the folder /var/www/html/folder_to_website you only need to put a passwd in apache or nginx, etc, (from 'root' if you only want 'root' access). Example: htpasswd -c /etc/apache2/.htpasswd $USER && apache2ctl configtest. And if you want to share the same folder in samba is for other users to have access to it, then only put which users will have access permission (valid users = foo or admin users = root ....) and set chmod / chown -R root:root /path_to_ folder
– ajcg
Nov 23 at 14:27