Kasm-user sudo password
Hi,
I am having issues running sudo for kasm-user for an Ubuntu container. When I try to install a new program I am promoted to a sudo password which I do not have.
I found this https://kasmweb.com/docs/latest/how_to/running_as_root.html#building-a-workspace-with-sudo KB and added kasm-user to the sudoers with no password but still, the issue is persistent.
Can the password be reset for the kasm-user?
The problem with that page is sudo is already installed in Ubuntu. You want to shorten the JSON you put in the Docker Exec Config to this:
{
"first_launch": {
"user": "root",
"cmd": "bash -c 'echo \"kasm-user ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers'"
}
}
Once you do this you will be able to sudo to root without a password.
Thank You but I am getting this error now.
Once I remove the JSON, it will work fine. Does this need to be done before the first launch?
There was a bug in the JSON, try the edited version I just pasted.
The problem with that page is sudo is already installed in Ubuntu. You want to shorten the JSON you put in the Docker Exec Config to this:
{ "first_launch": { "user": "root", "cmd": "bash -c 'echo \"kasm-user ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers'" } }Once you do this you will be able to sudo to root without a password.
Thank you @captbrando ! I can confirm that this worked perfectly for me.
I was able to start Ubuntu Jammy Desktop and run sudo apt update and it worked.