You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to execute /bin/bash as user and enter the jailed environment?
Basically I need a command to enter /bin/bash when stepping down as user using posix_setuid.
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Is there a way to execute /bin/bash as a user but in jailed environment?
Is there a way to execute /bin/bash as user and enter the jailed environment?
Jan 10, 2023
This did not work.
Actually I am using ttyd web terminal that I installed from github.
When I step down as user and login to ttyd web terminal, I am able to see other users' home directories and also enter them using cd command even when the user is jailed.
I enter the ttyd terminal from my php script where I call:
exec(SOMEPATH/bin/ttyd --once -u UID_OF_USER -g GID_OF_USER -P 10 -b /tty/ -i dir/username sock /bin/bash);
Adding su with this command like mentioned below works but it asks for password in the web terminal which I dont want.
exec(SOMEPATH/bin/ttyd --once -u UID_OF_USER -g GID_OF_USER -P 10 -b /tty/ -i dir/username sock su username);
After using su I am able to login as a jailed user but I have to enter password in the terminal to login.
I am looking for a solution where the user gets logged in without password.
Is there a way to execute /bin/bash as user and enter the jailed environment?
Basically I need a command to enter /bin/bash when stepping down as user using posix_setuid.
The text was updated successfully, but these errors were encountered: