Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Should´ve used sudo su #115

Merged
merged 1 commit into from

3 participants

@waaghals

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

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

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

@cyisfor

incidentally echo is insecure. do it like

sudo -S <<EOF
password
EOF

after the script is chmod og-rwx

better yet use sudo su.

@cjdelisle
Owner

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 cjdelisle merged commit d3274c4 into cjdelisle:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 18, 2012
  1. @waaghals

    Should´ve used sudo su

    waaghals authored
    Sudo does not work on a single line with `&`
    Or it becomes ugly as `echo <password> | sudo -S`
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  README.md
View
3  README.md
@@ -253,7 +253,8 @@ If you want to have your logs written to a file:
If you want to be able to close your terminal and you don't use screen:
- sudo ./cjdroute < cjdroute.conf > /dev/null &
+ sudo su
+ ./cjdroute < cjdroute.conf > /dev/null &
NOTE: when you use `&`, remember that you will have cjdroute processes running in the background
if you are having problems use `killall cjdroute` to return to sanity. Use `pgrep cjdroute` or `top` to see if it running.
Something went wrong with that request. Please try again.