On Tue, Sep 06, 2011 at 07:30:31PM +0100, Phil Blundell wrote:
> On Tue, 2011-09-06 at 11:20 +0200, Martin Jansa wrote:
> > Hi,
> > 
> > if someone wants to use only shadow as login manager, then all postinst
> > calling adduser (instead of useradd) are failing ie:
> > 
> > recipes-connectivity/avahi/avahi.inc:   grep "^avahi:" /etc/passwd > 
> > /dev/null || adduser --disabled-password --system --home 
> > /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
> > recipes-connectivity/avahi/avahi.inc:   grep "^avahi-autoipd:" /etc/passwd 
> > > /dev/null || adduser --disabled-password --system --home 
> > /var/lib/avahi-autoipd --no-create-home avahi-autoipd --ingroup 
> > avahi-autoipd -g "Avahi autoip daemon"
> > recipes-connectivity/openssh/openssh_5.8p2.bb:          adduser --system 
> > --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s 
> > /bin/false sshd
> > recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb:      adduser --system 
> > --home /dev/null --no-create-home --empty-password --ingroup nogroup -s 
> > ${sbindir}/ppp-dialin ppp
> > recipes-core/dbus/dbus.inc:             adduser --system --home 
> > "$MESSAGEHOME" --no-create-home --disabled-password \
> > recipes-devtools/distcc/distcc_2.18.3.bb:               grep distcc 
> > /etc/passwd || adduser --system --home /dev/null --no-create-home 
> > --empty-password --ingroup nogroup distcc
> > recipes-graphics/x11-common/xserver-nodm-init.bb:        adduser 
> > --disabled-password $username
> > recipes-multimedia/pulseaudio/pulseaudio.inc:            adduser 
> > --disabled-password --home=/var/run/pulse --system \
> > recipes-support/hal/hal.inc:    grep haldaemon /etc/passwd || adduser 
> > --disabled-password --system --home /var/run/hald --no-create-home 
> > haldaemon --ingroup haldaemon -g HAL
> > 
> > What is preferred fix,
> 
> I guess the first part of any preferred fix is going to have to be to
> get the postinsts to be consistent about what mechanism they use for
> adding users, rather than the mélange of different approaches that we
> seem to have today.  Ideally I think that would be by means of making
> the recipes in question use useradd.bbclass.  It might also be
> reasonable to extend useradd.bbclass to work with tinylogin and/or
> busybox's implementations of useradd if it doesn't already.
> 
> If there are recipes which can't use useradd.bbclass for whatever reason
> then I guess they should be adjusted to call useradd rather than
> adduser, since the former is the more standardized of the two.
> 
> As for tinylogin's adduser, I am inclined to say that it should probably
> just go away in favour of a wrapper around (ideally a generic) useradd.

just small update on this, from my original list only 2 recipes are
still not using useradd.bbclass:

recipes-connectivity/avahi/avahi.inc:   grep "^avahi:" /etc/passwd > /dev/null 
|| adduser --disabled-password --system --home /var/run/avahi-daemon 
--no-create-home avahi --ingroup avahi -g Avahi
recipes-connectivity/avahi/avahi.inc:   grep "^avahi-autoipd:" /etc/passwd > 
/dev/null || adduser --disabled-password --system --home /var/lib/avahi-autoipd 
--no-create-home avahi-autoipd --ingroup avahi-autoipd -g "Avahi autoip daemon"
recipes-devtools/distcc/distcc_2.18.3.bb:               grep distcc /etc/passwd 
|| adduser --system --home /dev/null --no-create-home --empty-password 
--ingroup nogroup distcc

Is someone using them? Any volunteer to migrate them and test them?

Cheers,

> > I plan to add u-a to shadow to provide adduser alternative 
> > or add RCONFLICT between tinylogin and shadow as we don't want some passwd 
> > entries
> > from tinylogin and some from shadow (when both installed at the same time.
> > Someone with better idea or even patches for it?
> 
> From the list of files you mentioned, it sounds as though the packages
> do conflict with each other at the moment (e.g. on ${bindir}/su) so
> adding RCONFLICTS is probably reasonable. 
> 
> p.
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: martin.ja...@gmail.com

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to