....I got a hint from it.toolbox
Hi Dan,
at last after many hours....og my God it works.....Thanks to all of you and IBM...
Sorry, it was first yesterday when I rerereread the thread and your answer "The file to use for the control list is configured using a module option and defaults to /etc/ftpusers..", it was the word "default" which gives me the hint.
ok the pam_permission library is not only for ftp but also for other tools..... Now it is very easy to control the users/groups who can ssh to the server (I don't want to "touch" any other protocol (apache, oracle, postfix..), I believe it requires more attention/test/work when using tcp-wrapper.
The solution is below:
lssec -f /etc/security/login.cfg -s usw -a auth_type
chsec -f /etc/security/login.cfg -s usw -a auth_type=PAM_AUTH
/etc/pam.conf
sshd auth required /usr/lib/security/pam_aix
sshd auth requisite /usr/lib/security/pam_permission file=/etc/security/access.conf found=prohibit
sshd account required /usr/lib/security/pam_aix
sshd password required /usr/lib/security/pam_aix
sshd session required /usr/lib/security/pam_aix
sshd session optional /usr/lib/security/pam_mkuserhome
/etc/security/access.conf #I called it access.conf just like on linux
+@network # the group network has ssh access to the server
+@LDAP_NOC_UNIXTEK
+john
-ALL
chsec -f /etc/security/user -s default -a "SYSTEM=files or LDAP" (compat not work for ldap login!!)
chsec -f /etc/security/user -s default -a "registry=LDAP" (compat not work for ldap)
Because of the "registry=LDAP" above, you need to do the following for enable local user login:
chsec -f /etc/security/user -s default -a "registry=files"
chuser registry=files <USER>
enable LDAP again:
chsec -f /etc/security/user -s default -a "registry=LDAP"
Test:
lsuser <USER>
lsldap -a passwd
Thanks again
Tuan