S
S
Sergey Karbivnichy2021-03-14 18:20:03
linux
Sergey Karbivnichy, 2021-03-14 18:20:03

How to subdue rights?

When adding myself to the group, I skipped the "-a -G" switches, but added "-g":
sudo usermod -g vboxusers sergey
Now the rights to the home folder have changed:

drwxr-xr-x  3 sergey vboxusers     4096 мар 14 16:53 'VirtualBox VMs'/
drwxrwxr-x  3 sergey vboxusers     4096 мар 13 14:25  .vpython_cipd_cache/
drwxrwxr-x  3 sergey vboxusers     4096 фев 23 18:06  .vscode/
-rw-rw-r--  1 sergey vboxusers      270 мар 13 20:56  .wget-hsts
drwxrwxr-x  4 sergey vboxusers     4096 мар 10 14:11  .wine/
drwxr-xr-x  2 sergey vboxusers     4096 фев 23 14:11  Видео/
drwxr-xr-x  4 sergey vboxusers     4096 мар 14 15:28  Документы/
drwxr-xr-x  5 sergey vboxusers     4096 мар 14 16:05  Загрузки/
drwxr-xr-x  3 sergey vboxusers     4096 мар  9 20:50  Изображения/
drwxr-xr-x  2 sergey vboxusers     4096 фев 23 14:11  Музыка/
drwxr-xr-x  2 sergey vboxusers     4096 фев 23 14:11  Общедоступные/
drwxrwxr-x 11 sergey vboxusers     4096 мар  9 23:20  Проекты/
drwxr-xr-x  2 sergey vboxusers     4096 мар 10 11:41 'Рабочий стол'/
drwxr-xr-x  4 sergey vboxusers     4096 фев 24 00:50  Шаблоны/

As I understand it, user sergey, group vboxusers. Before that it was sergey sergey.
Because of this, sudo stopped working:
sudo: /usr/bin/sudo должен принадлежать пользователю с uid 0 и иметь бит setuid

su doesn't work either, wrong password. I can boot into the recovery console, su works there.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2021-03-14
@hottabxp

The "-g" option specifies the primary group. So I did the following:
sudo usermod -g sergey sergey
But sudo didn't work. Next, I booted into the recovery console and reinstalled sudo, followed by "sudo passwd" and entered a new password. Everything obeyed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question