All of lore.kernel.org
 help / color / mirror / Atom feed
* Changing /etc/shadow file
@ 2013-11-23 13:14 rajan pathak
       [not found] ` <CALEed8bT5pH_StnPcYnbHDRPJ-74rtzE9_A2yt6W3AtTdcazTw@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: rajan pathak @ 2013-11-23 13:14 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

I have to make some changes to my /etc/shadow file,

I Can see shadow  file is from poky/meta/recipe-extended,so to change this
file
do I have to apply patch or what?

Thanks
Rajan

[-- Attachment #2: Type: text/html, Size: 271 bytes --]

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

* Re: Changing /etc/shadow file
       [not found] ` <CALEed8bT5pH_StnPcYnbHDRPJ-74rtzE9_A2yt6W3AtTdcazTw@mail.gmail.com>
@ 2013-11-24 10:07   ` rajan pathak
  2013-11-25 10:23     ` rajan pathak
  0 siblings, 1 reply; 4+ messages in thread
From: rajan pathak @ 2013-11-24 10:07 UTC (permalink / raw)
  To: Bernard Mentink, yocto, raj.khem

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]

Thanks Bernard

I tried patching the shadow file but couldn't make it work

My requirement is specific ,wanted to modify /etc/shadow file of rootfs

I don't know how /etc/shadow file is getting generated in my rootfs,though
I know the whole
Process of how /etc/passwd file is generated in my roofs .

Inside poky I have a recipe file which will generally fetches the
passwd.master from web and copy it to
/etc/passwd file of my rootfs .

But couldn't find any such process for /etc/shadow file

I have to disable one of the user account and that requires asterisk(*) to
be put in second column of user-specific line.

For example in /etc/shadow have to change

my_user::0:0....

to

my_ user:*:0:0...

+ Khem Raj here as he made most of work of shadow packaging in poky

Thanks
Rajan




On Sun, Nov 24, 2013 at 5:19 AM, Bernard Mentink <bmentink@gmail.com> wrote:

> Just make a /recipe-extended/ directory in your layer so it looks the same
> as the original. Then add a"files" directory with your new file, then add
> in a .bbappend file that
> looks for extra files in "files", then you are done.
>
> Have a look in other .bbappend of how to just add in new files, you will
> find lot's of examples in other layers ..
>
> Cheers,
> bernie
>
>
> On Sun, Nov 24, 2013 at 2:14 AM, rajan pathak <rajanpatha34@gmail.com>wrote:
>
>> I have to make some changes to my /etc/shadow file,
>>
>> I Can see shadow  file is from poky/meta/recipe-extended,so to change
>> this file
>> do I have to apply patch or what?
>>
>> Thanks
>> Rajan
>>
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 3148 bytes --]

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

* Re: Changing /etc/shadow file
  2013-11-24 10:07   ` rajan pathak
@ 2013-11-25 10:23     ` rajan pathak
  2013-11-25 10:27       ` Jack Mitchell
  0 siblings, 1 reply; 4+ messages in thread
From: rajan pathak @ 2013-11-25 10:23 UTC (permalink / raw)
  To: Bernard Mentink, yocto, Khem Raj

[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]

Running out of idea

Any would like to give some suggestion here?

Thanks


On Sun, Nov 24, 2013 at 3:37 PM, rajan pathak <rajanpatha34@gmail.com>wrote:

> Thanks Bernard
>
> I tried patching the shadow file but couldn't make it work
>
> My requirement is specific ,wanted to modify /etc/shadow file of rootfs
>
> I don't know how /etc/shadow file is getting generated in my rootfs,though
> I know the whole
> Process of how /etc/passwd file is generated in my roofs .
>
> Inside poky I have a recipe file which will generally fetches the
> passwd.master from web and copy it to
> /etc/passwd file of my rootfs .
>
> But couldn't find any such process for /etc/shadow file
>
> I have to disable one of the user account and that requires asterisk(*) to
> be put in second column of user-specific line.
>
> For example in /etc/shadow have to change
>
> my_user::0:0....
>
> to
>
> my_ user:*:0:0...
>
> + Khem Raj here as he made most of work of shadow packaging in poky
>
> Thanks
> Rajan
>
>
>
>
> On Sun, Nov 24, 2013 at 5:19 AM, Bernard Mentink <bmentink@gmail.com>wrote:
>
>> Just make a /recipe-extended/ directory in your layer so it looks the
>> same as the original. Then add a"files" directory with your new file, then
>> add in a .bbappend file that
>> looks for extra files in "files", then you are done.
>>
>> Have a look in other .bbappend of how to just add in new files, you will
>> find lot's of examples in other layers ..
>>
>> Cheers,
>> bernie
>>
>>
>> On Sun, Nov 24, 2013 at 2:14 AM, rajan pathak <rajanpatha34@gmail.com>wrote:
>>
>>> I have to make some changes to my /etc/shadow file,
>>>
>>> I Can see shadow  file is from poky/meta/recipe-extended,so to change
>>> this file
>>> do I have to apply patch or what?
>>>
>>> Thanks
>>> Rajan
>>>
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>>>
>>
>

[-- Attachment #2: Type: text/html, Size: 3829 bytes --]

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

* Re: Changing /etc/shadow file
  2013-11-25 10:23     ` rajan pathak
@ 2013-11-25 10:27       ` Jack Mitchell
  0 siblings, 0 replies; 4+ messages in thread
From: Jack Mitchell @ 2013-11-25 10:27 UTC (permalink / raw)
  To: yocto

On 25/11/13 10:23, rajan pathak wrote:
> Running out of idea
> 
> Any would like to give some suggestion here?
> 
> Thanks
> 
> 

I use this snippet to modify my passwd file so I'm sure you could adapt
it for the shadow file.

ROOTFS_POSTPROCESS_COMMAND_append = " \
  sed -i 's/*/x/' \
  ${IMAGE_ROOTFS}/etc/passwd ;"


-- 
  Jack Mitchell (jack@embed.me.uk)
  Embedded Systems Engineer
  Cambridgeshire, UK
  http://www.embed.me.uk
-- 


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

end of thread, other threads:[~2013-11-25 10:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-23 13:14 Changing /etc/shadow file rajan pathak
     [not found] ` <CALEed8bT5pH_StnPcYnbHDRPJ-74rtzE9_A2yt6W3AtTdcazTw@mail.gmail.com>
2013-11-24 10:07   ` rajan pathak
2013-11-25 10:23     ` rajan pathak
2013-11-25 10:27       ` Jack Mitchell

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.