All of lore.kernel.org
 help / color / mirror / Atom feed
* /etc/passwd thoughts
@ 2009-06-12 20:19 Warren Togami
       [not found] ` <4A32B84E.8090603-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Warren Togami @ 2009-06-12 20:19 UTC (permalink / raw)
  To: initramfs

[warren@newcaprica dracut]$ grep -r \/etc\/passwd *
modules.d/95nfs/install:dracut_install /etc/netconfig /etc/passwd 
/etc/services
modules.d/95nfs/install:#echo 
"rpc:x:32:32:Rpcbind:/var/lib/rpcbind:/bin/false" >> "$initdir/etc/passwd"
modules.d/90mdraid/install:inst /etc/passwd

It seems that we want an /etc/passwd for certain things in the initrd 
image, but is it really necessary for it to copy whatever users are on 
the generating system into the image?

Could we do anything else?

Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found] ` <4A32B84E.8090603-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-06-12 20:20   ` Bill Nottingham
       [not found]     ` <20090612202045.GA30968-Zdt1ptygihhQcNjhGXsBABcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Bill Nottingham @ 2009-06-12 20:20 UTC (permalink / raw)
  To: Warren Togami; +Cc: initramfs

Warren Togami (wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org) said: 
> [warren@newcaprica dracut]$ grep -r \/etc\/passwd *
> modules.d/95nfs/install:dracut_install /etc/netconfig /etc/passwd  
> /etc/services
> modules.d/95nfs/install:#echo  
> "rpc:x:32:32:Rpcbind:/var/lib/rpcbind:/bin/false" >> 
> "$initdir/etc/passwd"
> modules.d/90mdraid/install:inst /etc/passwd
>
> It seems that we want an /etc/passwd for certain things in the initrd  
> image, but is it really necessary for it to copy whatever users are on  
> the generating system into the image?

If daemons we want/need to start want to drop privleges... yes.

Bill
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found]     ` <20090612202045.GA30968-Zdt1ptygihhQcNjhGXsBABcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
@ 2009-06-12 20:23       ` Warren Togami
       [not found]         ` <4A32B94E.10902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Warren Togami @ 2009-06-12 20:23 UTC (permalink / raw)
  To: initramfs

On 06/12/2009 04:20 PM, Bill Nottingham wrote:
> Warren Togami (wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org) said:
>> [warren@newcaprica dracut]$ grep -r \/etc\/passwd *
>> modules.d/95nfs/install:dracut_install /etc/netconfig /etc/passwd
>> /etc/services
>> modules.d/95nfs/install:#echo
>> "rpc:x:32:32:Rpcbind:/var/lib/rpcbind:/bin/false">>
>> "$initdir/etc/passwd"
>> modules.d/90mdraid/install:inst /etc/passwd
>>
>> It seems that we want an /etc/passwd for certain things in the initrd
>> image, but is it really necessary for it to copy whatever users are on
>> the generating system into the image?
>
> If daemons we want/need to start want to drop privleges... yes.
>

But it is also pulling in user accounts.

It seems the above modules.d/95nfs/install creates its own /etc/passwd 
entry that it expects to be there.  Why can't we do this for all cases 
where something in the initrd needs an /etc/passwd entry?

Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found]         ` <4A32B94E.10902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-06-12 21:21           ` Seewer Philippe
       [not found]             ` <4A32C6CF.9010802-omB+W0Dpw2o@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Seewer Philippe @ 2009-06-12 21:21 UTC (permalink / raw)
  To: Warren Togami; +Cc: initramfs



Warren Togami wrote:
> On 06/12/2009 04:20 PM, Bill Nottingham wrote:
>> Warren Togami (wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org) said:
>>> [warren@newcaprica dracut]$ grep -r \/etc\/passwd *
>>> modules.d/95nfs/install:dracut_install /etc/netconfig /etc/passwd
>>> /etc/services
>>> modules.d/95nfs/install:#echo
>>> "rpc:x:32:32:Rpcbind:/var/lib/rpcbind:/bin/false">>
>>> "$initdir/etc/passwd"
>>> modules.d/90mdraid/install:inst /etc/passwd
>>>
>>> It seems that we want an /etc/passwd for certain things in the initrd
>>> image, but is it really necessary for it to copy whatever users are on
>>> the generating system into the image?
>>
>> If daemons we want/need to start want to drop privleges... yes.
>>
> 
> But it is also pulling in user accounts.
> 
> It seems the above modules.d/95nfs/install creates its own /etc/passwd 
> entry that it expects to be there.  Why can't we do this for all cases 
> where something in the initrd needs an /etc/passwd entry?

Actually 95nfs doesn't create its own entry. The part is commented out. 
But I agree we should do something about the passwd case.

Question: Who really needs passwd entries?
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found]             ` <4A32C6CF.9010802-omB+W0Dpw2o@public.gmane.org>
@ 2009-06-13  2:12               ` David Dillow
       [not found]                 ` <1244859170.18551.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: David Dillow @ 2009-06-13  2:12 UTC (permalink / raw)
  To: Seewer Philippe; +Cc: Warren Togami, initramfs

On Fri, 2009-06-12 at 23:21 +0200, Seewer Philippe wrote:
> Actually 95nfs doesn't create its own entry. The part is commented out.

Right; I'm torn on this. We want to support both portmap and rpcbind,
and at least rpcbind needs a user to run as -- it won't run without it.
I don't know what portmap wants.

I have it copying the passwd file as that seemed to be the most
distro-agnostic way I could do it.

I see a few options --
1) Copy /etc/passwd from the distro into the initrd; exposes user names,
but passwords should be in /etc/shadow and hence not copied.
2) Make our own users for rpcbind (and portmap if different) and just
use that. rpcbind gets killed before we transition to root, so the uid
doesn't have to match up.
3) Remove the need for rpcbind/portmap. Get mount fixed so it doesn't
try to look for rpc.statd for NFSv4; also figure out a way to keep the
kernel from trying to talk to rpcbind/portmap when mounting an NFSv4
volume.
3b) don't support locks at all on NFS roots, NFSv4 or otherwise. I don't
like this, it artificially restricts options.

> But I agree we should do something about the passwd case.
> 
> Question: Who really needs passwd entries?

rpcbind, as above. I don't know about iSCSI, is there a user-space
component that persists and wants to drop permissions?


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found]                 ` <1244859170.18551.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
@ 2009-06-13  4:04                   ` Seewer Philippe
  2009-06-16 18:42                   ` Warren Togami
  1 sibling, 0 replies; 9+ messages in thread
From: Seewer Philippe @ 2009-06-13  4:04 UTC (permalink / raw)
  To: David Dillow; +Cc: Warren Togami, initramfs



David Dillow wrote:
> On Fri, 2009-06-12 at 23:21 +0200, Seewer Philippe wrote:
>> Actually 95nfs doesn't create its own entry. The part is commented out.
> 
> Right; I'm torn on this. We want to support both portmap and rpcbind,
> and at least rpcbind needs a user to run as -- it won't run without it.
> I don't know what portmap wants.

Portmap doesn't want anything. In the past, I've even run it without an 
/etc at all.
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found]                 ` <1244859170.18551.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
  2009-06-13  4:04                   ` Seewer Philippe
@ 2009-06-16 18:42                   ` Warren Togami
       [not found]                     ` <4A38CABB.9070900@redhat.com>
  1 sibling, 1 reply; 9+ messages in thread
From: Warren Togami @ 2009-06-16 18:42 UTC (permalink / raw)
  To: David Dillow; +Cc: Seewer Philippe, initramfs

On 06/12/2009 10:12 PM, David Dillow wrote:
> On Fri, 2009-06-12 at 23:21 +0200, Seewer Philippe wrote:
>> Actually 95nfs doesn't create its own entry. The part is commented out.
>
> Right; I'm torn on this. We want to support both portmap and rpcbind,
> and at least rpcbind needs a user to run as -- it won't run without it.
> I don't know what portmap wants.
>
> I have it copying the passwd file as that seemed to be the most
> distro-agnostic way I could do it.
>
> I see a few options --
> 1) Copy /etc/passwd from the distro into the initrd; exposes user names,
> but passwords should be in /etc/shadow and hence not copied.
> 2) Make our own users for rpcbind (and portmap if different) and just
> use that. rpcbind gets killed before we transition to root, so the uid
> doesn't have to match up.

It seems the correct way would be:

If rpcbind, then write only the necessary user into the initrd's 
/etc/passwd.  Do not copy the generating system's /etc/passwd.

Any objections?

Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found]                       ` <4A38CABB.9070900-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-06-17 17:08                         ` Warren Togami
       [not found]                           ` <4A39231E.8050700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Warren Togami @ 2009-06-17 17:08 UTC (permalink / raw)
  To: initramfs

On 06/17/2009 06:51 AM, Harald Hoyer wrote:
>> If rpcbind, then write only the necessary user into the initrd's
>> /etc/passwd. Do not copy the generating system's /etc/passwd.
>>
>> Any objections?
>
> s.th. like
>
> grep $user /etc/passwd >> ${initdir}/etc/passwd
>
> ?

Yes, except does the rpcbind user need to run as any userid number in 
particular?  rpcbind gets killed before switch_root right?  We might be 
able to do this without grep scraping.

Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /etc/passwd thoughts
       [not found]                           ` <4A39231E.8050700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-06-18 17:14                             ` Harald Hoyer
  0 siblings, 0 replies; 9+ messages in thread
From: Harald Hoyer @ 2009-06-18 17:14 UTC (permalink / raw)
  To: Warren Togami; +Cc: initramfs

On 06/17/2009 07:08 PM, Warren Togami wrote:
> On 06/17/2009 06:51 AM, Harald Hoyer wrote:
>>> If rpcbind, then write only the necessary user into the initrd's
>>> /etc/passwd. Do not copy the generating system's /etc/passwd.
>>>
>>> Any objections?
>>
>> s.th. like
>>
>> grep $user /etc/passwd >> ${initdir}/etc/passwd
>>
>> ?
>
> Yes, except does the rpcbind user need to run as any userid number in
> particular? rpcbind gets killed before switch_root right? We might be
> able to do this without grep scraping.
>

right, OKFORME :)
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2009-06-18 17:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12 20:19 /etc/passwd thoughts Warren Togami
     [not found] ` <4A32B84E.8090603-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-12 20:20   ` Bill Nottingham
     [not found]     ` <20090612202045.GA30968-Zdt1ptygihhQcNjhGXsBABcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2009-06-12 20:23       ` Warren Togami
     [not found]         ` <4A32B94E.10902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-12 21:21           ` Seewer Philippe
     [not found]             ` <4A32C6CF.9010802-omB+W0Dpw2o@public.gmane.org>
2009-06-13  2:12               ` David Dillow
     [not found]                 ` <1244859170.18551.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
2009-06-13  4:04                   ` Seewer Philippe
2009-06-16 18:42                   ` Warren Togami
     [not found]                     ` <4A38CABB.9070900@redhat.com>
     [not found]                       ` <4A38CABB.9070900-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-17 17:08                         ` Warren Togami
     [not found]                           ` <4A39231E.8050700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-18 17:14                             ` Harald Hoyer

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.