On Friday, 12 July 2019 12:15:07 UTC, steve.coleman wrote: > On 7/11/19 9:36 PM, 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" > > > > and that worked, so I wrote a little script to more or less automate and > > explain the process: https://pastebin.com/UcJa0DvC > > > For what it is worth, you might just find it easier to start a root > terminal (e.g. gnome-terminal, xterm, etc) so that you can run all those > commands as root interactively at a command line. Chances are your > "stretch-minimal" may not have many choices of terminals, but then you > can always just add one to make your life a little easier. I don't know > stretch, but I would guess that the 'xterm' application is likely > already installed. > > $ qvm-run -a --user root stretch-minimal xterm > > 'gnome-terminal' is execelent if that is already installed.
Yes, there is an XTerm available in stretch-minimal. Good suggestion to run that as root from dom0, thanks, but I'm already in de sudo group now. ;-) -- 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/a7e2e004-a112-4043-98c2-d3fec70f891e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.