Net use
Jump to navigation
Jump to search
Example with smb/samba and net use test
DOMAIN is your AD/LDAP domain
/etc/samba/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"
systemctl restart smb
facls
Allow traverse of dir to list directory
sudo setfacl -m 'g:DOMAIN\sftp_clients_group_rw:x' /sftp/clients
Set perms and defaults for current files/dirs -Rdm (d is for default)
sudo setfacl -Rm 'g:DOMAIN\sftp_clients_someusergroup_rw:rx' /sftp/clients/someuser sudo setfacl -Rdm 'g:DOMAIN\sftp_clients_someusergroup_rw:rx' /sftp/clients/someuser
Remove all
sudo setfacl -Rx 'g:DOMAIN\sftp_clients_someusergroup_rw:rx' /sftp/clients/someuser sudo setfacl -x 'g:DOMAIN\sftp_clients_group_rw:x' /sftp/clients # for sure remove all perms sudo setfacl -x 'g:DOMAIN\sftp_clients_group_rw:rwx' /sftp/clients
Map drive and delete
net use k: \\sftp\myshare /user:DOMAIN\myuser dir k: mkdir k:\jtest rmdir k:\jtest net use /delete k: