smbcacls_LINUX_C语言_编程.pdf

上传人:asd****56 文档编号:70344527 上传时间:2023-01-19 格式:PDF 页数:5 大小:14.33KB
返回 下载 相关 举报
smbcacls_LINUX_C语言_编程.pdf_第1页
第1页 / 共5页
smbcacls_LINUX_C语言_编程.pdf_第2页
第2页 / 共5页
点击查看更多>>
资源描述

《smbcacls_LINUX_C语言_编程.pdf》由会员分享,可在线阅读,更多相关《smbcacls_LINUX_C语言_编程.pdf(5页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、SMBCACLS(1)User Commands SMBCACLS(1)Namesmbcacls Set or get ACLs on an NT file or directory namesSynopsissmbcacls/server/share filename D acls M acls a aclsS acls C name G name numeric t U username h dDESCRIPTIONThis tool is part of the samba(7)suite.The smbcacls program manipulates NT Access Contro

2、l Lists(ACLs)on SMBfile shares.OPTIONSThe following options are available to the smbcacls program.The formatof ACLs is described in the section ACL FORMATa|add aclsAdd the ACLs specified to the ACL list.Existing access controlentries are unchanged.M|modify aclsModify the mask value(permissions)for t

3、he ACLs specified on thecommand line.An error will be printed for each ACL specified thatwas not already present in the ACL listD|delete aclsDelete any ACLs specified on the command line.An error will beprinted for each ACL specified that was not already present in theACL list.S|set aclsThis command

4、 sets the ACLs on the file with only the ones specifiedon the command line.All other ACLs are erased.Note that the ACLspecified must contain at least a revision,type,owner and groupfor the call to succeed.C|chown nameThe owner of a file or directory can be changed to the name givenusing the C option

5、.The name can be a sid in the form S1xyz ora name resolved against the server specified in the first argument.This command is a shortcut for M OWNER:name.G|chgrp nameThe group owner of a file or directory can be changed to the namegiven using the G option.The name can be a sid in the formS1xyz or a

6、name resolved against the server specified n thefirst argument.This command is a shortcut for M GROUP:name.numericThis option displays all ACL information in numeric format.Thedefault is to convert SIDs to names and ACE types and masks to aSamba 3.503/30/2010 1SMBCACLS(1)User Commands SMBCACLS(1)rea

7、dable string format.t|testargsDont actually do anything,only validate the correctness of thearguments.h|helpPrint a summary of command line options.d|debuglevel=levellevel is an integer from 0 to 10.The default value if thisparameter is not specified is 0.The higher this value,the more detail will b

8、e logged to the logfiles about the activities of the server.At level 0,only criticalerrors and serious warnings will be logged.Level 1 is a reasonablelevel for daytoday running it generates a small amount ofinformation about operations carried out.Levels above 1 will generate considerable amounts of

9、 log data,andshould only be used when investigating a problem.Levels above 3 aredesigned for use only by developers and generate HUGE amounts of logdata,most of which is extremely cryptic.Note that specifying this parameter here will override thesmb.conf.5.html#parameter in the smb.conf file.V|versi

10、onPrints the program version number.s|configfile The file specified contains the configuration details required bythe server.The information in this file includes serverspecificinformation such as what printcap file to use,as well asdescriptions of all the services that the server is to provide.Sees

11、mb.conf for more information.The default configuration file nameis determined at compile time.l|logbasename=logdirectoryBase directory name for log/debug files.The extension.prognamewill be appended(e.g.log.smbclient,log.smbd,etc.).The logfile is never removed by the client.N|nopassIf specified,this

12、 parameter suppresses the normal password promptfrom the client to the user.This is useful when accessing a servicethat does not require a password.Unless a password is specified on the command line or this parameteris specified,the client will request a password.If a password is specified on the co

13、mmand line and this option isalso defined the password on the command line will be silentlyingnored and no password will be used.k|kerberosTry to authenticate with kerberos.Only useful in an ActiveDirectory environment.C|useccacheSamba 3.503/30/2010 2SMBCACLS(1)User Commands SMBCACLS(1)Try to use th

14、e credentials cached by winbind.A|authenticationfile=filenameThis option allows you to specify a file from which to read theusername and password used in the connection.The format of the fileisusername=password=domain=Make certain that the permissions on the file restrict access fromunwanted users.U

15、|user=username%passwordSets the SMB username or username and password.If%password is not specified,the user will be prompted.The clientwill first check the USER environment variable,then the LOGNAMEvariable and if either exists,the string is uppercased.If theseenvironmental variables are not found,t

16、he username GUEST is used.A third option is to use a credentials file which contains theplaintext of the username and password.This option is mainlyprovided for scripts where the admin does not wish to pass thecredentials on the command line or via environment variables.Ifthis method is used,make ce

17、rtain that the permissions on the filerestrict access from unwanted users.See the A for more details.Be cautious about including passwords in scripts.Also,on manysystems the command line of a running process may be seen via the pscommand.To be safe always allow rpcclient to prompt for a passwordand

18、type it in directly.ACL FORMATThe format of an ACL is one or more ACL entries separated by eithercommas or newlines.An ACL entry is one of the following:REVISION:OWNER:GROUP:ACL:/The revision of the ACL specifies the internal Windows NT ACL revisionfor the security descriptor.If not specified it def

19、aults to 1.Usingvalues other than 1 may cause strange behaviour.The owner and group specify the owner and group sids for the object.Ifa SID in the format S1xyz is specified this is used,otherwise thename specified is resolved using the server on which the file ordirectory resides.ACLs specify permis

20、sions granted to the SID.This SID again can bespecified in S1xyz format or as a name in which case it is resolvedagainst the server on which the file or directory resides.The type,Samba 3.503/30/2010 3SMBCACLS(1)User Commands SMBCACLS(1)flags and mask values determine the type of access granted to t

21、he SID.The type can be either ALLOWED or DENIED to allow/deny access to theSID.The flags values are generally zero for file ACLs and either 9 or 2for directory ACLs.Some common flags are:#define SEC_ACE_FLAG_OBJECT_INHERIT 0 x1#define SEC_ACE_FLAG_CONTAINER_INHERIT 0 x2#define SEC_ACE_FLAG_NO_PROPAG

22、ATE_INHERIT 0 x4#define SEC_ACE_FLAG_INHERIT_ONLY 0 x8At present flags can only be specified as decimal or hexadecimal values.The mask is a value which expresses the access right granted to the SID.It can be given as a decimal or hexadecimal value,or by using one ofthe following text strings which m

23、ap to the NT file permissions of thesame name.R Allow read access W Allow write access X Execute permission on the object D Delete the object P Change permissions O Take ownershipThe following combined permissions can be specified:READ Equivalent to RX permissions CHANGE Equivalent to RXWD permissio

24、ns FULL Equivalent to RWXDPO permissionsEXIT STATUSThe smbcacls program sets the exit status depending on the success orotherwise of the operations performed.The exit status may be one of thefollowing values.If the operation succeeded,smbcacls returns and exit status of 0.Ifsmbcacls couldnt connect

25、to the specified server,or there was an errorgetting or setting the ACLs,an exit status of 1 is returned.If therewas an error parsing any command line arguments,an exit status of 2 isreturned.VERSIONThis man page is correct for version 3 of the Samba suite.AUTHORThe original Samba software and relat

26、ed utilities were created by AndrewTridgell.Samba is now developed by the Samba Team as an Open Sourceproject similar to the way the Linux kernel is developed.Samba 3.503/30/2010 4SMBCACLS(1)User Commands SMBCACLS(1)smbcacls was written by Andrew Tridgell and Tim Potter.The conversion to DocBook for Samba 2.2 was done by Gerald Carter.Theconversion to DocBook XML 4.2 for Samba 3.0 was done by AlexanderBokovoy.Samba 3.503/30/2010 5

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 技术资料 > 其他杂项

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁