Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sudo error #58

Closed
Chinna-M opened this issue Jul 15, 2018 · 5 comments
Closed

Sudo error #58

Chinna-M opened this issue Jul 15, 2018 · 5 comments

Comments

@Chinna-M
Copy link

Hi All,

I’m getting below error while sudo’ing to mqadmin id while logging into remote linux machine..
While running the on Redhat server I get this below error
"module_stdout": "\r\nSorry, user mqadmin is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-frnjqhjiraruzyzodxgpwceqylxjkvbi; /usr/bin/python /var/tmp/ansible-tmp-1531448966.94-199117643620200/setup.py' as mqm on server1.\r\n",
"msg": "MODULE FAILURE",
"rc": 1

TASK [Gathering Facts] *******************************************************************************************************************************
fatal: [server1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to servers1 closed.\r\n", "module_stdout": "\r\nSorry, user mqadmin is not allowed to execute '/bin/bash -c echo BECOME-SUCCESS-ylpnxkqhbsjmcvmbjwhecfwolywoucsv; /usr/bin/python /var/tmp/ansible-tmp-1531457721.05-98554963015284/setup.py' as mqm on server1.\r\n", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/etc/ansible/mq/mqver.retry

Pls help me to resolve this.

Thanks
Chinna

@landryb
Copy link
Member

landryb commented Jul 16, 2018

This playbook isnt tested to work on RedHat and will probably not work as is, you'll need some manual work to adapt it (which requires some ansible knowledge, and georchestra knowledge).

The error you're seeing feels like misconfiguration of the remote machine, where for some reason your user isnt allowed to use sudo. This is probably a default to change on Red Hat, and not a bug in the playbook itself. Please retry with debian in its default configuration.

@landryb landryb closed this as completed Jul 16, 2018
@Chinna-M
Copy link
Author

Hi Landryb,

Thanks a lot for the response.. in my case i only have to use redhat linux rhel6 and 7 as part of the project.

If issue with linux build , any idea what could be the parameter i need to change in liunx machine???
Could you please help me on this.
Thank you ..

@Chinna-M
Copy link
Author

  • Also i can manually login and sudo to mqadmin id. Which works absolutely fine as expected. Only via ansible it’s failing with above error..

@landryb
Copy link
Member

landryb commented Jul 16, 2018

From what i understand of the error message, you're sshing as mqadmin, and sudoing to mqm. Which might not be what you expect... your should figure out the proper user configuration for ansible, as we don't know what you're trying to run and how.

If you have to use RedHat, sorry but you're on your own. The playbook is only tested on Debian.

@Chinna-M
Copy link
Author

Thanks lanndryb, actually.. I’m sshing using my own user id and then trying to sudo to mqm id..

Which is same as sudo su - mqm.

Is anything required in ssh settings on the linux machine??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants