On Friday, 12 July 2019 01:27:43 UTC, list...@gmail.com  wrote:
> On Wednesday, 10 July 2019 17:13:42 UTC, steve.coleman  wrote:
> > On 7/10/19 2:02 AM, <me> wrote:
> > > On Tuesday, 9 July 2019 12:31:23 UTC, steve.coleman  wrote:
> > >> On 7/9/19 7:25 AM, <me> wrote:
> > >>> Hi, I installed a Ubuntu-14.04 minimal template from qubes.3isec.org 
> > >>> using
> > >>>
> > >>> $ sudo dnf install 
> > >>> qubes-template-stretch-minimal-4.0.1-201812230252.noarch.rpm
> > >>>
> > >>> and that works 'fabelhaft' (German for 'fabulously' :), but inside the 
> > >>> running template I'm asked for a password when I try to sudo my way 
> > >>> into apt-get update.
> > >>>
> > >>> Does anyone know the password for 'user'?
> > >>>
> > >>> Thanks.
> > >>>
> > >>
> > >> If you can not sudo, you can always try running your command from Dom0
> > >> as user root:
> > >>
> > >> $ qvm-run -a --user root <YourTemplateNameHere> "apt-get update"
> > > 
> > > Thanks.
> > > I not only want to update, I also want to run all other kinds of commands 
> > > as sudo. Do you think I can run any command like this inside the qube 
> > > from within dom0?
> > 
> > You can also run any other command as root, like "passwd user" to set 
> > the password to a know value, or "gedit /etc/sudoers" and modify who can 
> > sudo, add yourself to the wheel group, etc... I can't say why your 
> > particular appvm prevents you from sudoing without testing the vm 
> > myself, but whatever the problem is, you now have a way to get a root 
> > shell to fix it.
> > 
> > hope this helps
> 
> It did, thanks for your help.
> The funny thing is, 
> 
> [user@dom0 ~]$ qvm-run -p --user root stretch-minimal "usermod -a -G sudo 
> user"
> 
> didn't work, even after 
> 
> [user@dom0 ~]$ qvm-run -p --user root stretch-minimal "service sudo restart"
> 
> although 'user' was added to the sudo group as could be seen from 
> 
> user@stretch-minimal:~$  cat /etc/group | grep sudo
> sudo:x:27:user
> 
> so I had to edit the sudoers file directly, then restarted the sudo service:
> 
> [user@dom0 ~]$ qvm-run -p --user root stretch-minimal "service sudo restart"
> [user@dom0 ~]$ 
> qvm-run -p --user stretch-minimal "service sudo restart"
> 
> and that worked, so I wrote a little script to more or less automate and 
> explain the process: https://pastebin.com/UcJa0DvC

Sorry, that last line should read:
[user@dom0 ~]$ qvm-run -p --user root stretch-minimal "service sudo restart"

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/d4ea0cbe-7af8-489b-9170-e1cc23ff4158%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to