Trying to fix user issue. Updating to version 2.0.26

This commit is contained in:
Alejandro Lembke Barrientos 2024-04-09 00:21:44 +00:00
parent c1affb8781
commit f929aaac63
Signed by: aleleba
GPG Key ID: F48D7CDEB47942BD
2 changed files with 8 additions and 1 deletions

View File

@ -18,12 +18,19 @@ if [ "${HOME_USER-}" ]; then
if [ "$HOME_USER" != "$(whoami)" ]; then if [ "$HOME_USER" != "$(whoami)" ]; then
sudo adduser --disabled-password --gecos "" ${HOME_USER} sudo adduser --disabled-password --gecos "" ${HOME_USER}
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# Copy environment variables from vscode user to HOME_USER
env | grep -v 'HOME_USER' | while read -r line; do
sudo su - ${HOME_USER} -c "echo 'export $line' >> ~/.bashrc"
done
sudo -u $HOME_USER -i sudo -u $HOME_USER -i
# Unfortunately we cannot change $HOME as we cannot move any bind mounts # Unfortunately we cannot change $HOME as we cannot move any bind mounts
# nor can we bind mount $HOME into a new home as that requires a privileged container. # nor can we bind mount $HOME into a new home as that requires a privileged container.
sudo usermod --login "$HOME_USER" vscode sudo usermod --login "$HOME_USER" vscode
sudo groupmod -n "$HOME_USER" vscode sudo groupmod -n "$HOME_USER" vscode
## Agregar binarios
sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd
sudo cd /home/${HOME_USER} sudo cd /home/${HOME_USER}
fi fi

View File

@ -1 +1 @@
2.0.25 2.0.26