LDAP 命名服务使用的缺省过滤器
如果没有使用 SSD 为给定的服务手动指定参数,将使用缺省过滤器。要列出给定服务的缺省过滤器,请使用带 -v 选项的 ldaplist。
在以下示例中,filter=(&(objectclass=iphost)(cn=abcde) 定义了缺省过滤器。
database=hosts
filter=(&(objectclass=iphost)(cn=abcde)
user data=(&(%s) (cn=abcde))
ldaplist 生成以下缺省过滤器列表,其中 %s 表示字符串,%d 表示数字。
hosts
(&(objectclass=iphost)(cn=%s))
--------------
passwd
(&(objectclass=posixaccount)(uid=%s))
--------------
services
(&(objectclass=ipservice)(cn=%s))
--------------
group
(&(objectclass=posixgroup)(cn=%s))
--------------
netgroup
(&(objectclass=nisnetgroup)(cn=%s))
--------------
networks
(&(objectclass=ipnetwork)(ipnetworknumber=%s))
--------------
netmasks
(&(objectclass=ipnetwork)(ipnetworknumber=%s))
--------------
rpc
(&(objectclass=oncrpc)(cn=%s))
--------------
protocols
(&(objectclass=ipprotocol)(cn=%s))
--------------
bootparams
(&(objectclass=bootableDevice)(cn=%s))
--------------
ethers
(&(objectclass=ieee802Device)(cn=%s))
--------------
publickey
(&(objectclass=niskeyobject)(cn=%s))
or
(&(objectclass=niskeyobject)(uidnumber=%d))
--------------
aliases
(&(objectclass=mailGroup)(cn=%s))
--------------
表 14-4 getXbyY 调用中使用的 LDAP 过滤器
|
|
bootparamByName |
(&(objectClass=bootableDevice)(cn=%s)) |
etherByHost |
(&(objectClass=ieee802Device)(cn=%s)) |
etherByEther |
(&(objectClass=ieee802Device)(macAddress=%s)) |
groupByName |
(&(objectClass=posixGroup)(cn=%s)) |
groupByGID |
(&(objectClass=posixGroup)(gidNumber=%ld)) |
groupByMember |
(&(objectClass=posixGroup)(memberUid=%s)) |
hostsByName |
(&(objectClass=ipHost)(cn=%s)) |
hostsByAddr |
(&(objectClass=ipHost)(ipHostNumber=%s)) |
keyByUID |
(&(objectClass=nisKeyObject)(uidNumber=%s)) |
keyByHost |
(&(objectClass=nisKeyObject)(cn=%s)) |
netByName |
(&(objectClass=ipNetwork)(cn=%s)) |
netByAddr |
(&(objectClass=ipNetwork)(ipNetworkNumber=%s)) |
nisgroupMember |
(membernisnetgroup=%s) |
maskByNet |
(&(objectClass=ipNetwork)(ipNetworkNumber=%s)) |
printerByName |
(&(objectClass=sunPrinter)(|(printer-name=%s) (printer-aliases=%s))) |
projectByName |
(&(objectClass=SolarisProject)(SolarisProjectName=%s)) |
projectByID |
(&(objectClass=SolarisProject)(SolarisProjectID=%ld)) |
protoByName |
(&(objectClass=ipProtocol)(cn=%s)) |
protoByNumber |
(&(objectClass=ipProtocol)(ipProtocolNumber=%d)) |
passwordByName |
(&(objectClass=posixAccount)(uid=%s)) |
passwordByNumber |
(&(objectClass=posixAccount)(uidNumber=%ld)) |
rpcByName |
(&(objectClass=oncRpc)(cn=%s)) |
rpcByNumber |
(&(objectClass=oncRpc)(oncRpcNumber=%d)) |
serverByName |
(&(objectClass=ipService)(cn=%s)) |
serverByPort |
(&(objectClass=ipService)(ipServicePort=%ld)) |
serverByNameAndProto |
(&(objectClass=ipService)(cn=%s)(ipServiceProtocol=%s)) |
specialByNameserver |
(ipServiceProtocol=%s)) |
ByPortAndProto |
(&(objectClass=shadowAccount)(uid=%s)) |
netgroupByTriple |
(&(objectClass=nisNetGroup)(cn=%s)) |
netgroupByMember |
(&(objectClass=nisNetGroup)(cn=%s)) |
authName |
(&(objectClass=SolarisAuthAttr)(cn=%s)) |
auditUserByName |
(&(objectClass=SolarisAuditUser)(uid=%s)) |
execByName |
(&(objectClass=SolarisExecAttr)(cn=%s) (SolarisKernelSecurityPolicy=%s)(SolarisProfileType=%s)) |
execByPolicy |
(&(objectClass=SolarisExecAttr)(SolarisProfileId=%s) (SolarisKernelSecurityPolicy=%s)(SolarisProfileType=%s)) |
profileByName |
(&(objectClass=SolarisProfAttr)(cn=%s)) |
userByName |
(&(objectClass=SolarisUserAttr)(uid=%s)) |
|
下表列出了 getent 属性过滤器。
表 14-5 getent 属性过滤器
|
|
aliases |
(objectClass=rfc822MailGroup) |
auth_attr |
(objectClass=SolarisAuthAttr) |
audit_user |
(objectClass=SolarisAuditUser) |
exec_attr |
(objectClass=SolarisExecAttr) |
group |
(objectClass=posixGroup) |
hosts |
(objectClass=ipHost) |
networks |
(objectClass=ipNetwork) |
prof_attr |
(objectClass=SolarisProfAttr) |
protocols |
(objectClass=ipProtocol) |
passwd |
(objectClass=posixAccount) |
printers |
(objectClass=sunPrinter) |
rpc |
(objectClass=oncRpc) |
services |
(objectClass=ipService) |
shadow |
(objectclass=shadowAccount) |
project |
(objectClass=SolarisProject) |
usr_attr |
(objectClass=SolarisUserAttr) |
|