Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Installing Ubuntu-14-04-02-minimal as template qube in qubes-os 4.0:
- #First get unman's package from 3isec.org (replace <downloadAppVM> with the AppVM used for downloading):
- #[user@<downloadAppVM>]$ wget -c http://qubes.3isec.org/Templates_4.0/qubes-template-stretch-minimal-4.0.1-201812230252.noarch.rpm
- #Copy package to dom0:
- #[user@dom0]$
- sudo qvm-run --pass-io <downloadAppVM> 'cat /home/user/Downloads/qubes-template-stretch-minimal-4.0.1-2012230252.noarch.rpm' > /home/user/Downloads/qubes-template-stretch-minimal-4.0.1-2012230252.noarch.rpm
- #Install package into template VM 'stretch-minimal':
- #[user@dom0 ~]$
- sudo dnf install /home/user/Downloads/qubes-template-stretch-minimal-4.0.1-2012230252.noarch.rpm
- #Start the template VM 'stretch-minimal':
- #Desktop-right-click | Applications | Template: stretch-minimal | stretch-minimal: XTerm
- #Set password for user:
- #[user@dom0 ~]$
- qvm-run -p --user root stretch-minimal "echo -e 'newuserpwd\nnewuserpwd' | passwd user"
- #Add user 'user' to sudo group:
- #Normally this would be done using
- #[user@dom0 ~]$ qvm-run -p --user root stretch-minimal "usermod -a -G sudo user"
- #but that didn't work for some reason, even after issuing
- #[user@dom0 ~]$ qvm-run -p --user root stretch-minimal "service sudo restart"
- #and even after confirming that 'user' is added to group 'sudo' in 'stretch-minimal' by giving the command in stretch-minimal's XTerm:
- #user@stretch-minimal:~$ cat /etc/group | grep sudo
- #and seeing the existence of the line "sudo:x:27:user"
- #What does work is adding the user 'user' directly to the /etc/sudoers file by
- #[user@dom0 ~]$
- qvm-run -p --user printf 'user ALL(ALL:ALL) ALL\n\n' >> /etc/sudoers"
- #and then restarting stretch-minimal's sudo server:
- #[user@dom0 ~]$
- qvm-run -p --user stretch-minimal "service sudo restart"
- #Now we can check in stretch-minimal itself:
- #user@stretch-minimal:~$ sudo cat /etc/sudoers
- #and use the sudo command.
- #[user@dom0 ~]$
- qvm-run -p --user stretch-minimal "cat /etc/sudoers"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement