All of lore.kernel.org
 help / color / mirror / Atom feed
* normal user for Intel BSPs?
@ 2012-01-25 17:36 jfabernathy
  2012-01-25 22:18 ` Darren Hart
  0 siblings, 1 reply; 4+ messages in thread
From: jfabernathy @ 2012-01-25 17:36 UTC (permalink / raw)
  To: yocto

I've noticed that the meta-intel BSP come up with the default terminal, 
serial console user, etc. as root.  What would it take to make my own 
BSP that was exactly the same, but the default was a not admin user, but 
you could su or sudo to root?

Jim A


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: normal user for Intel BSPs?
  2012-01-25 17:36 normal user for Intel BSPs? jfabernathy
@ 2012-01-25 22:18 ` Darren Hart
  2012-01-25 22:42   ` Scott Garman
  0 siblings, 1 reply; 4+ messages in thread
From: Darren Hart @ 2012-01-25 22:18 UTC (permalink / raw)
  To: jfabernathy; +Cc: yocto, Garman, Scott A

On 01/25/2012 09:36 AM, jfabernathy wrote:
> I've noticed that the meta-intel BSP come up with the default
> terminal, serial console user, etc. as root.  What would it take to
> make my own BSP that was exactly the same, but the default was a not
> admin user, but you could su or sudo to root?

I'm adding Scott G. who I believe has been working on the useradd
scripts and such (to sanity check the following). I believe you should
be able to setup new users by extending an image recipe with a new task
to make the necessary useradd/mod etc calls on the rootfs prior to
packaging it up.

Scott, can you offer more detail on how that is done?

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: normal user for Intel BSPs?
  2012-01-25 22:18 ` Darren Hart
@ 2012-01-25 22:42   ` Scott Garman
  2012-01-25 22:54     ` James Abernathy
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Garman @ 2012-01-25 22:42 UTC (permalink / raw)
  To: Darren Hart; +Cc: yocto

On 01/25/2012 02:18 PM, Darren Hart wrote:
> On 01/25/2012 09:36 AM, jfabernathy wrote:
>> I've noticed that the meta-intel BSP come up with the default
>> terminal, serial console user, etc. as root.  What would it take to
>> make my own BSP that was exactly the same, but the default was a not
>> admin user, but you could su or sudo to root?
>
> I'm adding Scott G. who I believe has been working on the useradd
> scripts and such (to sanity check the following). I believe you should
> be able to setup new users by extending an image recipe with a new task
> to make the necessary useradd/mod etc calls on the rootfs prior to
> packaging it up.
>
> Scott, can you offer more detail on how that is done?

Hi Jim, Darren:

The useradd mechanism is for supporting custom users and groups in 
recipes. It sounds like what Jim may find more expedient would be to 
define a recipe which includes a first-boot script which creates the 
additional users/groups and then sets up custom ownership on the 
terminal, serial console user, etc. Otherwise you'd have to do this in 
several recipes.

Using the first-boot script approach is documented here:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-extend-addpkg-postinstalls

Whereas using the useradd bitbake class is documented in an example 
recipe in meta-skeleton/recipes-skeleton/useradd/useradd-example.bb. 
There is also a slide deck you may find useful here:

http://wiki.yoctoproject.org/wiki/images/e/e6/Custom_Users_Groups_in_Yocto1.1.pdf

I'll also mention that I'm still shaking out bugs in the useradd 
mechanism. We have some race conditions that are complicating matters 
when building from sstate. So if you're using one of our stable 
releases, the first-boot script approach is probably your safest bet.

Scott

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: normal user for Intel BSPs?
  2012-01-25 22:42   ` Scott Garman
@ 2012-01-25 22:54     ` James Abernathy
  0 siblings, 0 replies; 4+ messages in thread
From: James Abernathy @ 2012-01-25 22:54 UTC (permalink / raw)
  To: Scott Garman; +Cc: yocto, Darren Hart


On Jan 25, 2012, at 5:42 PM, Scott Garman wrote:

> On 01/25/2012 02:18 PM, Darren Hart wrote:
>> On 01/25/2012 09:36 AM, jfabernathy wrote:
>>> I've noticed that the meta-intel BSP come up with the default
>>> terminal, serial console user, etc. as root.  What would it take to
>>> make my own BSP that was exactly the same, but the default was a not
>>> admin user, but you could su or sudo to root?
>> 
>> I'm adding Scott G. who I believe has been working on the useradd
>> scripts and such (to sanity check the following). I believe you should
>> be able to setup new users by extending an image recipe with a new task
>> to make the necessary useradd/mod etc calls on the rootfs prior to
>> packaging it up.
>> 
>> Scott, can you offer more detail on how that is done?
> 
> Hi Jim, Darren:
> 
> The useradd mechanism is for supporting custom users and groups in recipes. It sounds like what Jim may find more expedient would be to define a recipe which includes a first-boot script which creates the additional users/groups and then sets up custom ownership on the terminal, serial console user, etc. Otherwise you'd have to do this in several recipes.
> 
> Using the first-boot script approach is documented here:
> 
> http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-extend-addpkg-postinstalls
> 
> Whereas using the useradd bitbake class is documented in an example recipe in meta-skeleton/recipes-skeleton/useradd/useradd-example.bb. There is also a slide deck you may find useful here:
> 
> http://wiki.yoctoproject.org/wiki/images/e/e6/Custom_Users_Groups_in_Yocto1.1.pdf
> 
> I'll also mention that I'm still shaking out bugs in the useradd mechanism. We have some race conditions that are complicating matters when building from sstate. So if you're using one of our stable releases, the first-boot script approach is probably your safest bet.
> 
> Scott
> 

Thanks for these suggestions. I'll look them over and figure out what I want to do.

Jim A

> -- 
> Scott Garman
> Embedded Linux Engineer - Yocto Project
> Intel Open Source Technology Center



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-25 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-25 17:36 normal user for Intel BSPs? jfabernathy
2012-01-25 22:18 ` Darren Hart
2012-01-25 22:42   ` Scott Garman
2012-01-25 22:54     ` James Abernathy

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.