-
Notifications
You must be signed in to change notification settings - Fork 172
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
Remove hardcodes password for sudoer postscript #6166
base: master
Are you sure you want to change the base?
Conversation
esac | ||
done | ||
|
||
if [ -z "$SUDOER" ] || [ -z $SUDOERPW ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest $SUDOER
and $SUDOERPW
be set to default value if not specified to keep backward compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea of using command line argument to pass the password. This idea is even worse than hard code the password. I list some of the reasons below.
- User might need to run something like
chdef mid08tor03cn01 -p 'postscripts=sudoer -u xcat2 -p rootpw'
to make it works. It is complex. - It use to have a single place to change the default password. Now it is scattered to node attribute across different compute nodes.
- Passing password with command line argument is insecure. The command line argument can be read by
ps ax
.
@neo954 , any suggestion which method will be better? I think we should support different sudoer so can't define in the site table, or passwd table, or node attributes. can we prompt the command and ask for user input? I think another options is reading user/password from a file. |
|
The PR is to fix issue #5115
The modification include
##Remove hardcodes username and password for sudoer
-##User needs to pass in arguments for sudoer username and password
The UT result
##The UT output##