Closed ssghost closed 6 years ago
Same for me. sudo command is accepted, win asks for elevated permissions, but nothing else happens, console freeze at this point. ctrl-c doesn't work, must stop with ctrl-z, and kill %1
Dang. I just came across this myself and was super excited, but I had the same issue as both of you. Here's hoping it might be an easy fix!
Working on this!
Does sudo echo 1
work for you? I've just installed win-sudo via curl -s https://raw.githubusercontent.com/imachug/win-sudo/master/install.sh | sh
and it works for me.
There was a bug with usernames containing special characters (including space), is this the case for you?
I've tried it again. The problem still exists. My username has no special characters.
Okay, I'll add some debugging output and send you the link soon.
@ssghost I've pushed to branch testing
. Please do:
$ git clone https://github.com/imachug/win-sudo
$ cd win-sudo
$ git checkout testing
$ ./su
...and post the output. You should get:
going to start sudo
sudo started
checking admin
checking args
checking WSL
backend: /c/Users/Ivanq/Documents/win-sudo/sudobackend
created fifos: /tmp/.sudo.20675
created io fifos
set traps
<UAC window will be opened now>
bash: cannot set terminal process group (3140): Operation not permitted
bash: no job control in this shell
Ivanq@ASUS-PC MSYS ~/Documents/win-sudo (master) [SUDO]
$ started powershell
pid: 1924
set SIGINT trap
passed stdin
passed stdout&stderr
<type 'exit' now>
exit
got: 1
finished
cleaning
cleaning done
./su
going to start sudo
sudo started
checking admin
checking args
checking WSL
backend: /c/Users/jfenk/win-sudo/sudobackend
created fifos: /tmp/.sudo.22528
created io fifos
set traps
started powershell
pid: 6312
set SIGINT trap
passed stdin
passed stdout&stderr
The line res=$(cat "$fifoid.finish")
will cause the problem.
Seems like the finish pipe never closes.
So, does nothing happen when you type exit<enter>
?
No.
Try Ctrl+C
.
passed stdin passed stdout&stderr exit < nothing happens, so pressed ctrl-z> [1]+ Stopped ./su
later it can be handled as a normal bash job. fg, bg, kill works.
$ kill %1 cleaning [1]+ Terminated ./su
G508031@RMM-P7000032FW MINGW64 ~/Work/win-sudo (testing) $ cleaning done
i'm having this problem, too. on git's bash.
Can you check if Git Bash or Powershell or Command line are running in background while sudo is hanging?
It doesn't work for me either it just hangs and there is no output, in testing branch there is some output
./su
going to start sudo
sudo started
checking admin
checking args
checking WSL
backend: /c/Users/ricardo/bin/win-sudo/s/sudobackend
created fifos: /tmp/.sudo.13739
created io fifos
set traps
started powershell
pid: 27364
set SIGINT trap
passed stdin
passed stdout&stderr
bash is running in the background but it doesn't die even after closing the window you have to kill it from task manager or do C^z and then kill %1
Looks like the problem is in the backend for some reason is not loading the path and can't find cat, just added /bin/ before each cat and it seems to work. Not sure it is the best solution but it works for now
Looks like the problem was fixed.
still not working
Does
sudo echo 1
work for you? I've just installed win-sudo viacurl -s https://raw.githubusercontent.com/imachug/win-sudo/master/install.sh | sh
and it works for me.There was a bug with usernames containing special characters (including space), is this the case for you?
i have a space in my name, how to do i fix this problem?
I was successfully installed win-sudo in Git-bash of Win10, but then I typed any command begin with "sudo" a prompt box would pop up and notice me to "execute bash.exe", I clicked on "yes", and nothing happened after this, the cursor stayed at the next command line (which was empty) of Git bash window.