Thanks for your efforts, here is info from IBM i recieved now about, problem......
https://community.ibm.com/community/user/power/discussion/sudo-users-from-ldap-with-local-groups
IJ32836 bos.rte.libc 7.1.5.38,IJ35379 bos.rte.libc 7.2.5.200,IJ34997 bos.rte.libc 7.2.5.101,IJ31131 bos.rte.libc 7.2.5.4,IJ32840 bos.rte.libc 7.2.4.5
There is no APAR for 7.3 because it is grandfathered into the base release.
---------------------------------------------------------------------------------------------------------------
Original Message:
Sent: Mon October 30, 2023 08:32 AM
From: C- -T
Subject: SUDO part 2
just in case you not already seens this...there are certain thinks to be taken care of in sudo if used in an ldap environment.
https://www.sudo.ws/docs/man/1.8.17/sudoers.ldap.man/
------------------------------
I regret starting this entire conversation
Original Message:
Sent: Mon October 30, 2023 08:17 AM
From: C- -T
Subject: SUDO part 2
so you want pull sudoers from ldap on aix...,your mileage will definitely vary. i tried this a while back but failed miserably.
post with similar topic...
https://community.ibm.com/community/user/power/discussion/sudo-users-from-ldap-with-local-groups
------------------------------
I regret starting this entire conversation
Original Message:
Sent: Mon October 30, 2023 08:06 AM
From: Per-Ola Hassle
Subject: SUDO part 2
Okej but
NO
We are using IDM with AIX.......and we have this working except the SUDO part.....
If we take this step by step and try to solve it.
Users can do SUDO if the belong to group=unix_unix_high_users
If i go, throw the AIX configuration once again for IDM i can't find anything that is missing to make this work with AIX integration to RedHat IDM?
Is there something we must change on IDM side to makes this work?
On Every AIX server we have LDAP.CFG to point at the IDM server which sets the rules to login.
ldapservers:txxx0745.idm
On Every AIX server we have KRB5.CONF to point at the IDM server.
root@techa0011# cat /etc/krb5/krb5.conf
techl0745.idm.eu.txx.corp = IDM.EU.T........
On Every AIX server we have NETSVC.CONF to enable Sudo rules from IDM server.
hosts = bind4,local, sudoers = files, ldap
If i understand right ?
Sudo access on an IDM client can be done,
-Locally in the /etc/sudoers file
-Centrally in IDM
Right now, we must use Locally in the /etc/sudoers file which makes all very hard and difficult to handle.
How can we go over to Centrally in IDM?
------------------------------
Per-Ola Hassle
Original Message:
Sent: Mon October 30, 2023 08:01 AM
From: C- -T
Subject: SUDO part 2
no need to regret...but as far as my understanding goes, you are unable to use sudo for users which have mixed ldap and local groups, so IF this is the case the provided link contains exactly the solution for this problem.
edit:
ok, found this between all the clutter...
Question is,Need to provide sudo access for other group also from IDM end.....
you are using ldap groups only. so you are right...my answer was useless
------------------------------
I regret starting this entire conversation
Original Message:
Sent: Mon October 30, 2023 07:03 AM
From: Per-Ola Hassle
Subject: SUDO part 2
öö C- -T regret....you have not understand and not even try to read anything :)
------------------------------
Per-Ola Hassle
Original Message:
Sent: Mon October 30, 2023 06:54 AM
From: C- -T
Subject: SUDO part 2
as you are using ldap users you need to instruct the aix secldapclient to use domainless groups...
https://www.ibm.com/support/pages/using-domainless-group-feature-allow-ldap-users-belong-local-groups
so still no sudo issue..
------------------------------
I regret starting this entire conversation
Original Message:
Sent: Mon October 30, 2023 04:14 AM
From: Per-Ola Hassle
Subject: SUDO part 2
Hello all,
To nail down the problem we have and if somebody know this ?
Sudo access is working fine for all users but ONLY under group=unix_unix_high_users
These other groups here under users is unable to do sudo?
unix_sapbasis_medium
unix_sapbasis_high_users
unix_monitoring_medium_users
.............and more groups....
Is there something in sudoers file that we must change to make the other groups work for Sudo From AIX end?
Or
Something needs to be checked from IDM end? To be change here ?
I mean if unix_unix_high users are able to do sudo WHY can't the other groups do sudo ?
This is the big Q?
Thanks
Per-Ola
------------------------------
Per-Ola Hassle
Original Message:
Sent: Fri October 20, 2023 10:45 AM
From: Russell Adams
Subject: SUDO part 2
On Fri, Oct 20, 2023 at 02:39:12PM +0000, Per-Ola Hassle via IBM TechXchange Community wrote:
> We can't get SUDO to work with IDM (User authentication)?
Can you post your sudoers?
> The configuration of, AllowGroups and DenyGroups is working as
> excepted.
This is SSH configuration, not sudo.
Also why it's better to just use SSH keys to elevate privs instead of sudo.
------------------------------------------------------------------
Russell Adams Russell.Adams@AdamsSystems.nl
Principal Consultant Adams Systems Consultancy
https://adamssystems.nl/
Original Message:
Sent: 10/20/2023 10:39:00 AM
From: Per-Ola Hassle
Subject: SUDO part 2
Hi all
I have update sudo version to 1.9.13p2. Thanks for all HELP of this with all dependencies!
but
We can't get SUDO to work with IDM (User authentication)?
We have follow all documentation and it works fine....EXCEPT for SUDO part?
Anyone that can help on this part ?
Question is,
Need to provide sudo access for other group also from IDM end.....
The configuration of, AllowGroups and DenyGroups is working as excepted.
root@techa0011# cat sshd_config |grep -iE 'AllowGroups|DenyGroups'
DenyGroups unix_techemother_high_users
AllowGroups system unix_techemaixdbadm_high_users unix_unix_high_users unix_sapbasis_high_users unix_sapbasis_medium_users unix_monitoring_medium_users.
We test with this 3 users here under and only user=nr 3, is able to logon and use sudo?
Why not the other users ?
1) hx12254 user id (unix_sapbasis_high_users) was unable to do sudo to this server .
2) dei02099 user id (unix_techemaixdbadm_high_users) was unable to do sudo to this server
3) hx11775 user id (unix_unix_high_users) was able to do sudo to this server .
root@techa0011# sudo -V |head
Sudo version 1.9.13p2
Configure options: --prefix=/opt/freeware --sbindir=/opt/freeware/sbin --libdir=/opt/freeware/lib --mandir=/opt/freeware/man --libexecdir=/opt/freeware/libexec --with-logging=syslog --with-logfac=auth --with-pam --with-pam-login --with-env-editor --with-ignore-dot --with-aixauth --disable-year2038 --with-tty-tickets --with-ldap=/opt/freeware --with-ldap-conf-file=/opt/freeware/etc/openldap/ldap.conf
Sudoers policy plugin version 1.9.13p2
Sudoers file grammar version 50
Sudoers path: /etc/sudoers
ldap.conf path: /opt/freeware/etc/openldap/ldap.conf
ldap.secret path: /etc/ldap.secret
Authentication methods: 'aixauth' 'pam'
Syslog facility if syslog is being used for logging: auth
root@techa0011# sudo -l -U hx12254
User hx12254 is not allowed to run sudo on techa0011.
root@techa0011# lsuser hx12254
hx12254 id=11170 pgrp=hx12254 groups=hx12254,unix_sapbasis_medium_users,unix_sapbasis_high_users home=/home/hx12254 shell=/bin/bash gecos=Srinivas Ramanna Ramanna login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=22 registry=KRB5LDAP SYSTEM=KRB5LDAP OR compat logintimes= loginretries=0 pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0 minloweralpha=0 minupperalpha=0 minother=0 mindigit=0 minspecialchar=0 mindiff=0 maxrepeats=8 minlen=0 histexpire=0 histsize=0 pwdchecks= dictionlist= default_roles= datecreated=0 fsize=-1 cpu=-1 data=-1 stack=-1 core=2097151 rss=65536 nofiles=32000 time_last_unsuccessful_login=1692701242 tty_last_unsuccessful_login=ssh host_last_unsuccessful_login=153.112.6.40 unsuccessful_login_count=2 roles=
root@techa0011# lsldap -a group unix_sapbasis_high_users |grep -i hx12254
memberUid: hx12254
root@techa0011#
root@techa0011# sudo -l -U dei02099
User dei02099 is not allowed to run sudo on techa0011.
root@techa0011# lsuser dei02099
dei02099 id=63367 pgrp=techmgrp groups=techmgrp,unix_techemother_high_users,unix_techemaixdbadm_high_users,admins,unix_techemaixdbops_high_users home=/home/dei02099 shell=/bin/bash gecos=Leander Dahlmann login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=22 registry=KRB5LDAP SYSTEM=KRB5LDAP OR compat logintimes= loginretries=0 pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0 minloweralpha=0 minupperalpha=0 minother=0 mindigit=0 minspecialchar=0 mindiff=0 maxrepeats=8 minlen=0 histexpire=0 histsize=0 pwdchecks= dictionlist= default_roles= datecreated=0 fsize=-1 cpu=-1 data=-1 stack=-1 core=2097151 rss=65536 nofiles=32000 time_last_login=1694492571 time_last_unsuccessful_login=1683639247 tty_last_login=ssh tty_last_unsuccessful_login=ssh host_last_login=10.196.73.65 host_last_unsuccessful_login=10.196.73.65 unsuccessful_login_count=0 roles=
root@techa0011# lsldap -a group unix_techemaixdbadm_high_users |grep -i dei02099
memberUid: dei02099
root@techa0011#
root@techa0011# sudo -l -U hx11775
User hx11775 may run the following commands on techa0011:
(ALL : ALL) ALL
root@techa0011# lsuser hx11775
hx11775 id=11183 pgrp=hx11775 groups=hx11775,unix_unix_high_users home=/home/hx11775 shell=/bin/bash gecos=Elangovan Subramaniyan login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=22 registry=KRB5LDAP SYSTEM=KRB5LDAP OR compat logintimes= loginretries=0 pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0 minloweralpha=0 minupperalpha=0 minother=0 mindigit=0 minspecialchar=0 mindiff=0 maxrepeats=8 minlen=0 histexpire=0 histsize=0 pwdchecks= dictionlist= default_roles= datecreated=0 fsize=-1 cpu=-1 data=-1 stack=-1 core=2097151 rss=65536 nofiles=32000 time_last_login=1697807116 time_last_unsuccessful_login=1697807106 tty_last_login=ssh tty_last_unsuccessful_login=ssh host_last_login=153.112.6.40 host_last_unsuccessful_login=153.112.6.40 unsuccessful_login_count=0 roles=
root@techa0011#
root@techa0011# lsldap -a group unix_unix_high_users |grep -i hx11775
memberUid: hx11775
root@techa0011#
*Regards
Per-Ola
------------------------------
Per-Ola Hassle
------------------------------