botgram / shell-bot

:robot: Telegram bot that executes commands and sends the live output
GNU General Public License v3.0
797 stars 488 forks source link

Sudo error #20

Closed mishailovic closed 4 years ago

mishailovic commented 4 years ago

I installed the bot on my Raspberry Pi and it works great. But I have problems with some commands, like pip and apt.
Here's what I get: IMG_20200123_230754 Yeah, and server running from sudo, i don't know where is problem

How can I fix this?

avissian commented 4 years ago

What does the /run echo $USER command output? Is username correct?

mishailovic commented 4 years ago

@avissian Yes, it says I'm root

mildsunrise commented 4 years ago

WTF, I can't figure out why that would happen

what's the output of /run id?

mildsunrise commented 4 years ago

also, how are you running the server? manually from a terminal?

mishailovic commented 4 years ago

Yep, manually

rubusarbaro commented 4 years ago

I will write here because the title of the issue:

@mildsunrise I have a problem with sudo as well, but when I use it, the process doesn't continue, it stay like frozen. It doesn't matter if I use sudo [command] or when I use sudo -s I have to use /kill because it doesn't work.

I don't know how to insert an screenshot from phone, so I leave the link here: https://thumb.cloud.mail.ru/weblink/thumb/xw0/2cjq/joAGPgCJF/Screenshot_20200222-224612_Telegram-01.jpeg

The system I'm using is: Xubuntu 18 Thank you. The program works good (except for sudo)

mildsunrise commented 4 years ago

@hurondefuego try to enable passwordless sudo for a moment, and try again. If it works this way, then it's surely due to the password prompt

mishailovic commented 4 years ago

Hmm, I don’t even know what the problem was. I reinstalled the OS on my raspberry pi, and now everything works perfectly.