Should´ve used sudo su #115

Merged
merged 1 commit into from Aug 19, 2012

Conversation

Projects
None yet
3 participants
Contributor

waaghals commented Aug 18, 2012

Sudo does not work on a single line with &
Or it becomes ugly as echo <password> | sudo -S

Didn´t test it properly before.
Already had a sudo sessions and didn´t need to enter my password i guess

Should´ve used sudo su
Sudo does not work on a single line with `&`
Or it becomes ugly as `echo <password> | sudo -S`
Owner

cjdelisle commented Aug 18, 2012

I see, I have sudo set as NOPASS so I don't need a password.

Contributor

cyisfor commented Aug 18, 2012

incidentally echo is insecure. do it like

sudo -S <<EOF
password
EOF

after the script is chmod og-rwx

better yet use sudo su.

Owner

cjdelisle commented Aug 19, 2012

indeed, passing passwords on the command line is susceptible to a 'ps -aux' attack. I'll pull this as soon as I get my workspace cleaned up.

cjdelisle pushed a commit that referenced this pull request Aug 19, 2012

@cjdelisle cjdelisle merged commit d3274c4 into cjdelisle:master Aug 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment