All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Console login root needing a password
Date: Thu, 3 May 2012 15:42:05 +0200	[thread overview]
Message-ID: <20120503154205.483441b5@skate> (raw)
In-Reply-To: <4FA27B9B.3080108@peavey-eu.com>

Le Thu, 03 May 2012 13:35:39 +0100,
Graham Newton <gnewton@peavey-eu.com> a ?crit :

> I recently had this issue when I directly mounted the buildroot 
> generated filesystem via NFS.  After a frustrating day I discovered
> that the suid bit had be set on the busybox executable.  So when
> login was run busybox ran as an unknown user (not root) and so failed
> causing the login to fail.  The fix was to run chmod -s busybox on
> the NFS server. What was baffeling was that the issue went away if I
> copied the filesystem somewhere else.
> In the course of my investigations I found I could login if I tried 
> Yegor's solution but it did not give me root access.

Busybox is normally installed inside the target filesystem image with
the suid bit set. From package/busybox/busybox.mk:

define BUSYBOX_PERMISSIONS
/bin/busybox                     f 4755 0 0 - - - - -
/usr/share/udhcpc/default.script f 755  0 0 - - - - -
endef

Are you sure:

 * You extracted output/images/rootfs.tar as root, and didn't use
   output/target for your NFS export? If you did the latter, then of
   course all permissions would be wrong, because output/target is
   created by Buildroot, which doesn't run as root and therefore can't
   set any special permission.

 * You configured your NFS export with no_root_squash?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2012-05-03 13:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 23:38 [Buildroot] Console login root needing a password Nigel Sollars
2012-05-03  6:45 ` Yegor Yefremov
2012-05-03  9:30   ` Nigel Sollars
2012-05-03 12:06     ` Yegor Yefremov
2012-05-03 12:35     ` Graham Newton
2012-05-03 13:42       ` Thomas Petazzoni [this message]
2012-05-04  3:04         ` Nigel Sollars
2012-05-04  6:22           ` Thomas Petazzoni
2012-05-04  6:32             ` Yegor Yefremov

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=20120503154205.483441b5@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.