Skip to content

Commit fc73674

Browse files
Rui Miguel Silva Seabraabbra
authored andcommitted
Proper HBAC solution for AIX
1 parent 23ee528 commit fc73674

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

src/page/ConfiguringAixClients.rst

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Create :file:`/etc/security/ldap/ipauser.map`:
211211
LDAP client configuration
212212
-------------------------
213213

214-
Create :file:`/etc/security/ldap/ldap.cfg`:
214+
Create :file:`/etc/security/ldap/ldap.cfg`, **note that you don't want to allow locked users**:
215215

216216
::
217217

@@ -228,7 +228,7 @@ Create :file:`/etc/security/ldap/ldap.cfg`:
228228
krbkeypath:/etc/krb5/krb5.keytab
229229
krbprincipal:host/[email protected]
230230
defaultentrylocation:local
231-
userbasedn:cn=users,cn=accounts,dc=example,dc=com??(memberOf=ipaUniqeID=12345678-1234-1234-1234567890ab,cn=hbac,dc=example,dc=com)
231+
userbasedn:cn=users,cn=accounts,dc=example,dc=com??(!(nsaccountlocked=TRUE))
232232
groupbasedn:cn=groups,cn=accounts,dc=example,dc=com
233233
netgroupbasedn:cn=ng,cn=compat,dc=example,dc=com
234234
userclasses:posixaccount
@@ -240,16 +240,42 @@ Create :file:`/etc/security/ldap/ldap.cfg`:
240240
resolveUserFromDN:yes
241241

242242

243-
If you don't use :abbr:`HBAC (Host-based access control)`, your `userbasedn` parameter may be specified without any additional filters, like:
243+
You need `netgroupbasedn` parameter only if you use sudo with netgroups. If you don't use sudo with netgroups, you can drop the parameter.
244+
245+
The password to the GSKit certificate store (`ldapsslkeypwd`) can be encrypted using :command:`secldapclntd -e` command. But the option is not documented.
246+
247+
HBAC (Host-based access control)
248+
--------------------------------
249+
250+
You can have **true** :abbr:`HBAC (Host-based access control)` using `pam_ipahbac <https://github.com/rseabra/pam_ipahbac/>`, after installation you place a `/etc/ipahbac.conf` file with the pam module's configuration:
244251

245252
::
246253

247-
userbasedn:cn=users,cn=accounts,dc=example,dc=com
254+
-u YourSysAccount
255+
-b dc=your,dc=domain
256+
-P /etc/ldap.secret
257+
-l ldaps://ldap1/,ldaps://ldap2/..
248258

259+
And add the following to `/etc/pam.cfg`:
249260

250-
You need `netgroupbasedn` parameter only if you use sudo with netgroups. If you don't use sudo with netgroups, you can drop the parameter.
261+
::
251262

252-
The password to the GSKit certificate store (`ldapsslkeypwd`) can be encrypted using :command:`secldapclntd -e` command. But the option is not documented.
263+
sshd account required pam_ipahbac.so /etc/ipahbac.conf
264+
265+
266+
**Alternatively**, if you don't mind using a limited version of HBAC support, you can change your *userbasedn* field in **ldap.cfg** to check the user properties for being a member of a particular HBAC rule:
267+
268+
::
269+
270+
(...)
271+
userbasedn:cn=users,cn=accounts,dc=example,dc=com??(&(!(nsaccountlocked=TRUE))(memberOf=ipaUniqeID=12345678-1234-1234-1234567890ab,cn=hbac,dc=example,dc=com))
272+
(...)
273+
274+
If you don't want to use HBAC, or prevent locked users from logging in, your `userbasedn` parameter may be specified without any additional filters, like:
275+
276+
::
277+
278+
userbasedn:cn=users,cn=accounts,dc=example,dc=com
253279

254280

255281
Home directories

0 commit comments

Comments
 (0)