cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
764 Views
Registered: ‎09-11-2017

modify sudoers

Hello!

I`m using Petalinux 2017.2 and having trouble modifying /etc/sudoers file. 

I found /etc/sudoers is a part of sudo package, so I added sudo folder to <petalinux>/project-spec/meta-user/recipes-core with sudo_%.bbappend file and sudo subfolder.

sudo_%.bbappend contains the only line 

FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"

and sudo subfolder contains modified etc/sudoers file.

Where am I wrong?

Tags (1)
0 Kudos
2 Replies
Highlighted
Moderator
Moderator
723 Views
Registered: ‎04-24-2017

Re: modify sudoers

Hi @mishuk,

 

Which file you are trying to modify ?

 

sudo recipe should be under recipes-extended as show below http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-extended/sudo?h=morty

 

<plnx-proj-root>/project-spec/meta-user/recipes-extended/sudo_%.bbappend 
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
683 Views
Registered: ‎09-11-2017

Re: modify sudoers

Finally I got the desired result modifying files:

project-spec/meta-user/recipes-core/sudo/sudo/sudoers
project-spec/meta-user/recipes-core/sudo/sudo_%.bbappend

 

sudo_%.bbappend:

 

FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
SRC_URI += "file://sudoers"
do_install_append () {
    install -m 0644 ${WORKDIR}/sudoers ${D}${sysconfdir}/sudoers
}

 

You proposed another way through modifying recipes-extended layer.  Which way is the best?  I mean maintainability in long-range perspective.

Tags (3)
0 Kudos