Received: from cpanel7.indieserve.net (cpanel7.indieserve.net [199.212.143.8]) by mx.groups.io with SMTP id smtpd.web10.15067.1586784586749458412 for ; Mon, 13 Apr 2020 06:29:47 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: crashcourse.ca, ip: 199.212.143.8, mailfrom: rpjday@crashcourse.ca) Received: from cpeac202e043973-cmac202e043970.sdns.net.rogers.com ([174.114.100.179]:39506 helo=localhost.localdomain) by cpanel7.indieserve.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jNz9k-003LEk-Oz for openembedded-core@lists.openembedded.org; Mon, 13 Apr 2020 09:29:45 -0400 Date: Mon, 13 Apr 2020 09:29:42 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: OE Core mailing list Subject: recommended way to "/bin/sh" -> "/sbin/nologin" various accounts in new image? Message-ID: MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel7.indieserve.net X-AntiAbuse: Original Domain - lists.openembedded.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - crashcourse.ca X-Get-Message-Sender-Via: cpanel7.indieserve.net: authenticated_id: rpjday+crashcourse.ca/only user confirmed/virtual account not confirmed X-Authenticated-Sender: cpanel7.indieserve.net: rpjday@crashcourse.ca X-Source: X-Source-Args: X-Source-Dir: Content-Type: text/plain; charset=US-ASCII colleague just pointed out that, in a new core-image-minimal, the base-passwd recipe loads up /etc/passwd (based on initial passwd.master file) with various accounts that really don't merit a login shell of /bin/sh: ... daemon:*:1:1:daemon:/usr/sbin:/bin/sh bin:*:2:2:bin:/bin:/bin/sh sys:*:3:3:sys:/dev:/bin/sh sync:*:4:65534:sync:/bin:/bin/sync games:*:5:60:games:/usr/games:/bin/sh man:*:6:12:man:/var/cache/man:/bin/sh lp:*:7:7:lp:/var/spool/lpd:/bin/sh mail:*:8:8:mail:/var/mail:/bin/sh news:*:9:9:news:/var/spool/news:/bin/sh ... it is, of course, trivial to add a couple patches to base-passwd.bbappend to reduce a lot of those to using /sbin/nologin rather than /bin/sh, but is there a simpler way? is there a variable which you can set to, say, the passwd accounts to be weakened this way? or do people just patch the passwd.master file? or is there yet another alternative? rday