* How /etc/shadow packed into my final image?
[not found] <886279436.3600717.1508846299490.ref@mail.yahoo.com>
@ 2017-10-24 11:58 ` Bacheh Karaji
2017-10-25 2:53 ` ChenQi
0 siblings, 1 reply; 4+ messages in thread
From: Bacheh Karaji @ 2017-10-24 11:58 UTC (permalink / raw)
To: Yocto Project
[-- Attachment #1: Type: text/plain, Size: 178 bytes --]
Hi,
I wanted to modify the content of /etc/shadow,but don't know how /etc/shadow files is packed into final image.
Can anybody how it is packed and way to modify it?Thanks
[-- Attachment #2: Type: text/html, Size: 594 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How /etc/shadow packed into my final image?
2017-10-24 11:58 ` How /etc/shadow packed into my final image? Bacheh Karaji
@ 2017-10-25 2:53 ` ChenQi
2017-10-25 7:30 ` Bacheh Karaji
2017-10-26 14:02 ` Zoran Stojsavljevic
0 siblings, 2 replies; 4+ messages in thread
From: ChenQi @ 2017-10-25 2:53 UTC (permalink / raw)
To: Bacheh Karaji, Yocto Project
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
On 10/24/2017 07:58 PM, Bacheh Karaji wrote:
> Hi,
>
> I wanted to modify the content of /etc/shadow,
> but don't know how /etc/shadow files is packed into final image.
>
> Can anybody how it is packed and way to modify it?
> Thanks
>
>
>
>
The file is created in postinst of the shadow package.
Codes are like below:
root@qemux86-64:~# rpm -q --scripts shadow
postinstall scriptlet (using /bin/sh):
# shadow - postinst
if [ "x$D" != "x" ]; then
rootarg="--root $D"
else
rootarg=""
fi
pwconv $rootarg || exit 1
grpconv $rootarg || exit 1
[snip]
There are several ways to modify the file, depending on your purpose.
If you just want to modify/add/delete user/group in recipe, please try
to make use of useradd*.bbclass.
http://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-manual.html#ref-classes-useradd
If you want to do user/group operation in conf file, please try to make
use of extrausers.bbclass.
http://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-manual.html#ref-classes-extrausers
The above should be basically enough.
Best Regards,
Chen Qi
[-- Attachment #2: Type: text/html, Size: 2705 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How /etc/shadow packed into my final image?
2017-10-25 2:53 ` ChenQi
@ 2017-10-25 7:30 ` Bacheh Karaji
2017-10-26 14:02 ` Zoran Stojsavljevic
1 sibling, 0 replies; 4+ messages in thread
From: Bacheh Karaji @ 2017-10-25 7:30 UTC (permalink / raw)
To: ChenQi, Yocto Project
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
OH! Thank you! I had forgotten about that.
On Wednesday, October 25, 2017 6:22 AM, ChenQi <Qi.Chen@windriver.com> wrote:
On 10/24/2017 07:58 PM, Bacheh Karaji wrote:
Hi,
I wanted to modify the content of /etc/shadow, but don't know how /etc/shadow files is packed into final image.
Can anybody how it is packed and way to modify it? Thanks
The file is created in postinst of the shadow package.
Codes are like below:
root@qemux86-64:~# rpm -q --scripts shadow
postinstall scriptlet (using /bin/sh):
# shadow - postinst
if [ "x$D" != "x" ]; then
rootarg="--root $D"
else
rootarg=""
fi
pwconv $rootarg || exit 1
grpconv $rootarg || exit 1
[snip]
There are several ways to modify the file, depending on your purpose.
If you just want to modify/add/delete user/group in recipe, please try to make use of useradd*.bbclass.
http://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-manual.html#ref-classes-useradd
If you want to do user/group operation in conf file, please try to make use of extrausers.bbclass.
http://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-manual.html#ref-classes-extrausers
The above should be basically enough.
Best Regards,
Chen Qi
[-- Attachment #2: Type: text/html, Size: 4370 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How /etc/shadow packed into my final image?
2017-10-25 2:53 ` ChenQi
2017-10-25 7:30 ` Bacheh Karaji
@ 2017-10-26 14:02 ` Zoran Stojsavljevic
1 sibling, 0 replies; 4+ messages in thread
From: Zoran Stojsavljevic @ 2017-10-26 14:02 UTC (permalink / raw)
To: ChenQi; +Cc: Yocto Project
[-- Attachment #1: Type: text/plain, Size: 2295 bytes --]
Hello Chen,
Very interesting answer you did give on this email thread... I have learned
something useful, indeed. :-)
I did try what you have suggested on target, but also, out of curiosity, on
the host (Fedora 26).
And here is what I have on the host (CLI transcript follows):
[user@localhost modules]$ uname -r
4.13.8-200.fc26.x86_64
[user@localhost modules]$ rpm -qa | grep shadow
shadow-utils-4.3.1-3.fc26.x86_64
[user@localhost modules]$ rpm -q --scripts shadow
package shadow is not installed
[user@localhost modules]$ rpm -q --scripts shadow-utils
[user@localhost modules]$
I was, after all, surprised (expected the same/similar). Any idea why this
is different?
Should be the same/similar. I'll investigate further the host problem
(seems, something/some package is missing/not installed).
Thank you,
Zoran
On Wed, Oct 25, 2017 at 4:53 AM, ChenQi <Qi.Chen@windriver.com> wrote:
> On 10/24/2017 07:58 PM, Bacheh Karaji wrote:
>
> Hi,
>
> I wanted to modify the content of /etc/shadow,
> but don't know how /etc/shadow files is packed into final image.
>
> Can anybody how it is packed and way to modify it?
> Thanks
>
>
>
>
>
> The file is created in postinst of the shadow package.
>
> Codes are like below:
> root@qemux86-64:~# rpm -q --scripts shadow
> postinstall scriptlet (using /bin/sh):
> # shadow - postinst
> if [ "x$D" != "x" ]; then
> rootarg="--root $D"
> else
> rootarg=""
> fi
>
> pwconv $rootarg || exit 1
> grpconv $rootarg || exit 1
> [snip]
>
> There are several ways to modify the file, depending on your purpose.
> If you just want to modify/add/delete user/group in recipe, please try to
> make use of useradd*.bbclass.
> http://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-
> manual.html#ref-classes-useradd
>
> If you want to do user/group operation in conf file, please try to make
> use of extrausers.bbclass.
> http://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-
> manual.html#ref-classes-extrausers
>
> The above should be basically enough.
>
> Best Regards,
> Chen Qi
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
[-- Attachment #2: Type: text/html, Size: 4439 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-26 14:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <886279436.3600717.1508846299490.ref@mail.yahoo.com>
2017-10-24 11:58 ` How /etc/shadow packed into my final image? Bacheh Karaji
2017-10-25 2:53 ` ChenQi
2017-10-25 7:30 ` Bacheh Karaji
2017-10-26 14:02 ` Zoran Stojsavljevic
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.