I have a sample python script: sample.py. The script takes the argument as the user name and password to connect to some remote server. When I run the script sample.py --username  --password , the password is being logged in linux messages files. I understand this is a linux behavior, but wondering if we can do anything within my script to avoid this logging. One way I can think is to provide password in an interactive way. Any other suggestions?
I figured out the best way is to disable it via sudo command:
Cmnd_Alias SCRIPT =
Defaults!SCRIPT !syslog
The above lines in sudoers.conf should help from preventing the logging in syslog.
plain Password is logged via my python script