Need help: How to get share permissions

David Disseldorp ddiss at suse.de
Mon Oct 15 08:01:39 MDT 2012


Hi Dhivya,

On Mon, 15 Oct 2012 07:20:38 -0600
"Dhivya Sundhari" <sdhivya at novell.com> wrote:

> This is the information I am interested in 
> "Permissions: 0x1f01ff: SYNCHRONIZE_ACCESS WRITE_OWNER_ACCESS WRITE_DAC_ACCESS READ_CONTROL_ACCESS DELETE_ACCESS
> SID: S-1-1-0"
> 
> I am using libnetapi's function "NetShareGetInfo" in the test program to get similar result as that of rpcclient. 
> But the rpc call with level 502 is failing with error 50 (not_supported).  Other levels of this rpc dosen't return sec_desc_buf. 
> 
> Can anybody help me in identifying other ways to get share permissions?

Does the smbcacls binary provide the details you need?

ddiss at plati:~/isms/samba/source3> bin/smbcacls //192.168.155.64/2k12 doc.txt -U'Administrator%Password'
REVISION:1
CONTROL:SR|DI|DP
OWNER:BUILTIN\Administrators
GROUP:WIN-CMOF3DBL7FV\None
ACL:WIN-CMOF3DBL7FV\Administrator:ALLOWED/0x0/0x001e01bd
ACL:NT AUTHORITY\SYSTEM:ALLOWED/I/FULL
ACL:BUILTIN\Administrators:ALLOWED/I/FULL
ACL:BUILTIN\Users:ALLOWED/I/READ

Cheers, David


More information about the samba-technical mailing list