ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Mikhail Efremov <sem@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Невозможно создать пользователя при сборке rootfs на хосте с Сизифом
Date: Fri, 28 Jun 2024 13:18:59 +0300
Message-ID: <20240628131859.11d8e674@sem-nb2> (raw)
In-Reply-To: <f1829da9-ed38-453c-b460-4835be7c3fe9@basealt.ru>

[-- Attachment #1: Type: text/plain, Size: 2461 bytes --]

On Fri, 28 Jun 2024 10:19:37 +0300 Anton Farygin wrote:
> On 27.06.2024 18:26, Mikhail Efremov wrote:
> > On Mon, 24 Jun 2024 19:19:45 +0700 Антон Мидюков wrote:  
> >>>      
> >>>>> Проблема только на хостах с Сизифом. Если на хосте p10, то пользователь успешно создаётся при сборке.
> >>>>> Также, если убрать из образа gnome-software и gnome-control-center, то пользователь создаётся успешно и при сборке на хосте с Сизифом.  
> > Виновником является fwupd, точнее не он сам, а запускаемый из-за
> > /lib/sysusers.d/fwupd.conf systemd-sysusers. Вот после него useradd
> > получает "Permission denied" при попытке открыть /etc/gshadow.
> > Почему - я не понимаю, возможно это связано с тем, что все это под
> > fakeroot.
> > В качестве workaround можно сделать в скрипте 50-users
> > chmod u+w /etc/gshadow{,-}
> > Ну или вообще rm /etc/gshadow.  
> 
> Почему-то в hasher под пользователем:
> 
> [builder@localhost .in]$ ls -al /etc/gshadow
> -rw------- 1 rooter rooter 737 Jun 27 11:00 /etc/gshadow
> [builder@localhost .in]$ id rooter
> uid=501(rooter) gid=501(rooter) groups=501(rooter)
> [builder@localhost .in]$

Я не знаю кто и как создает этот файл. А также /etc/shadow, который
вообще скорее вреден, учитывая, что у нас TCB.

> И под рутом:
> 
> [root@localhost .in]# ls -al /etc/gshadow
> -rw------- 1 root root 737 Jun 27 11:00 /etc/gshadow
> 
> но в реальной системе права у /etc/gshadow у меня тоже меняются на
> 
> $ ls -al /etc/gshadow
> -r-------- 1 root root 1667 июн  8 07:57 /etc/gshadow
> 
> Правда, при этом useradd работает

В описанной выше ситуации тоже такие права, но если не было запуска
systemd-sysusers, то useradd работает. А вот если файл предварительно
systemd-sysusers потрогал, то useradd уже Permission denied получает.

-- 
WBR, Mikhail Efremov

[-- Attachment #2: Цифровая подпись OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-06-28 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-22 10:28 Антон Мидюков
2024-06-24 12:05 ` Mikhail Efremov
2024-06-24 12:11   ` Mikhail Efremov
2024-06-24 12:19     ` Антон Мидюков
2024-06-27 15:26       ` Mikhail Efremov
2024-06-28  7:19         ` Anton Farygin
2024-06-28 10:18           ` Mikhail Efremov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240628131859.11d8e674@sem-nb2 \
    --to=sem@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git