Skip to content

Commit

Permalink
smbcacls: add page (#15475)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coontzy1 authored Jan 16, 2025
1 parent bbb2c02 commit 32317de
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pages/linux/smbcacls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# smbcacls

> View and manipulate Windows ACLs on SMB shares.
> Part of the Samba suite.
> More information: <https://www.samba.org/samba/docs/current/man-html/smbcacls.1.html>.
- Display the ACLs for a file or directory on a remote SMB share:

`smbcacls //{{server}}/{{share}} {{path/to/file_or_directory}} --user {{domain\\username}}%{{password}}`

- Set a new ACL for a file on a remote SMB share (replace `"ACL:..."` with a valid Windows ACL specification):

`smbcacls //{{server}}/{{share}} {{path/to/file}} --user {{domain\\username}}%{{password}} "ACL:{{DACL}}"`

- Remove all existing ACL entries and set a new ACL:

`smbcacls //{{server}}/{{share}} {{path/to/file}} --user {{domain\\username}}%{{password}} "RESET" "ACL:{{DACL}}"`

- Specify an alternative workgroup (or domain) and have the program prompt for a password interactively:

`smbcacls //{{server}}/{{share}} {{path/to/file}} --user {{username}} --workgroup {{workgroup}}`

0 comments on commit 32317de

Please sign in to comment.