Difference between revisions of "Net use"
Jump to navigation
Jump to search
(Created page with "``` net use k: \\mynost\mysharename /user:MYDOMAIN\myuser net use /delete k: ```") |
|||
Line 1: | Line 1: | ||
+ | Example with smb | ||
+ | |||
``` | ``` | ||
− | net use k: \\ | + | # DOMAIN is your AD domain |
+ | sudo setfacl -Rm 'g:DOMAIN\sftp_clients_group_rw:rwx' /sftp/clients | ||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | net use k: \\sftp\myshare /user:MYDOMAIN\myuser | ||
net use /delete k: | net use /delete k: | ||
+ | ``` | ||
+ | |||
+ | smb.conf | ||
+ | ``` | ||
+ | [myshare] | ||
+ | path = /sftp/clients/someuser | ||
+ | writeable = yes | ||
+ | browseable = no | ||
+ | valid users = @"DOMAIN\sftp_clients_group_rw" | ||
+ | write list = @"DOMAIN\sftp_clients_group_rw" | ||
+ | ``` | ||
+ | |||
+ | facls | ||
+ | ``` | ||
+ | # set for current files/dirs | ||
+ | sudo setfacl -Rm 'g:DOMAIN\sftp_clients_group_rw:rx' /sftp/clients | ||
+ | # set defaults for new files | ||
+ | sudo setfacl -Rdm 'g:DOMAIN\sftp_clients_group_rw:rx' /sftp/clients | ||
+ | # remove all | ||
+ | sudo setfacl -Rx 'g:DOMAIN\sftp_clients_group_rw:rx' /sftp/clients | ||
``` | ``` |
Revision as of 00:19, 25 March 2022
Example with smb
# DOMAIN is your AD domain sudo setfacl -Rm 'g:DOMAIN\sftp_clients_group_rw:rwx' /sftp/clients
net use k: \\sftp\myshare /user:MYDOMAIN\myuser net use /delete k:
smb.conf
[myshare] path = /sftp/clients/someuser writeable = yes browseable = no valid users = @"DOMAIN\sftp_clients_group_rw" write list = @"DOMAIN\sftp_clients_group_rw"
facls
# set for current files/dirs sudo setfacl -Rm 'g:DOMAIN\sftp_clients_group_rw:rx' /sftp/clients # set defaults for new files sudo setfacl -Rdm 'g:DOMAIN\sftp_clients_group_rw:rx' /sftp/clients # remove all sudo setfacl -Rx 'g:DOMAIN\sftp_clients_group_rw:rx' /sftp/clients