Thanks Kai for the valuable information you shared with me.
Thanks & Regards Rajendra Rawat On Sat, 6 Oct 2018 at 12:50, Kai Stian Olstad < [email protected]> wrote: > On 05.10.2018 08:14, Rajendra Rawat wrote: > > Output: ansible xyz.com -a id > > xyz.com | SUCCESS | rc=0 >> > > uid=10102(rajrawat) gid=59968(oinstall) > > groups=59968(oinstall),10(wheel) > > This also show that you are member of wheel, and that Ansible is running > under those membership. > > > > /etc/log/secure file contents: > > > > Oct 4 23:09:18 xyz sshd[12957]: pam_unix(sshd:session): session opened > > for user rajrawat by (uid=0) > > Oct 4 23:09:22 xyz sudo: PAM unable to > > dlopen(/usr/lib/security/pam_pwquality.so): > > /usr/lib/security/pam_pwquality.so: cannot open shared object file: No > > such file or directory > > Oct 4 23:09:22 xyz sudo: PAM adding faulty module: > > /usr/lib/security/pam_pwquality.so > > This indicate to me that you are not running the vanilla distribution > but some customization has been done. > Might it be that some of this customization has broken some part of PAM > and/or sudoers? > > When you log in and run sudo you are using an interactive shell, but > when Ansible is running it is using non-interactive shell this might be > and factor if any customization has been done to the server. > > > > Kindly suggest on what could be the problem. > > Apart from the above I don't have any more to contribute since that > would be outside of this groups scope. > > -- > Kai Stian Olstad > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/e5f8eac7cdc665ed65107b25f73a1c50%40olstad.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAGvnwVF_E37m9XTU%2BZ%2B8Lem795Gvi%2B3ZNFFOKJ18w6KrMCC9cA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
