Message370336
Hi,
We are using below command to get the original login user. In some cases folks sudo as different user and run commands. In some cases folks use switch to different user (su - <>) and then run command. In all cases we would like to get original user who logged into the terminal to run the command. We are using below command to get the same.
user=os.getlogin()
We got three RHEL linux systems with Python 3 and strangely on two of them this command works fine. However only on third system it is failing with below error
OSError: [Errno 6] No such device or address
Not sure if it is some o/s env setup which is causing this command to fail. Any pointers to run this command will be of great help so that we can pin point the issue.
Please note on faiing system if I do python and then run the command it works fine without any issue. However if it is triggered through our Scheduler (Control M) it is failing with above message.
Give below is the command how Scheduler triggers the job.
/bin/su - edwadm -c /bin/sh -x <>
Thanks
Manick. |
|
Date |
User |
Action |
Args |
2020-05-29 20:31:30 | Manickaraja Kumarappan | set | recipients:
+ Manickaraja Kumarappan |
2020-05-29 20:31:30 | Manickaraja Kumarappan | set | messageid: <1590784290.42.0.113469889536.issue40821@roundup.psfhosted.org> |
2020-05-29 20:31:30 | Manickaraja Kumarappan | link | issue40821 messages |
2020-05-29 20:31:29 | Manickaraja Kumarappan | create | |
|