1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 01:02:09 +02:00

smbcacls: add page (#15475)

This commit is contained in:
Coontzy1 2025-01-15 22:55:11 -05:00 committed by GitHub
parent bbb2c02b0d
commit 32317dea4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

21
pages/linux/smbcacls.md Normal file
View file

@ -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}}`