summaryrefslogtreecommitdiff
path: root/recipes-extended/sudo
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-04-20 11:26:50 -0500
committerJohn Klug <john.klug@multitech.com>2017-05-23 15:22:10 -0500
commitdf5312a5710020377380fd4e5b0e971366edc319 (patch)
tree08d029cce6620cd6932acca1df776f187bc7c1bc /recipes-extended/sudo
parent0641240a3fe5f3dd0856c9a24aa1b13e98c56e59 (diff)
downloadmeta-mlinux-atmel-df5312a5710020377380fd4e5b0e971366edc319.tar.gz
meta-mlinux-atmel-df5312a5710020377380fd4e5b0e971366edc319.tar.bz2
meta-mlinux-atmel-df5312a5710020377380fd4e5b0e971366edc319.zip
Add sudo so root password can be eliminated eventually
Diffstat (limited to 'recipes-extended/sudo')
-rw-r--r--recipes-extended/sudo/sudo/privacy1
-rw-r--r--recipes-extended/sudo/sudo/sudoers.patch21
-rw-r--r--recipes-extended/sudo/sudo_%.bbappend12
3 files changed, 34 insertions, 0 deletions
diff --git a/recipes-extended/sudo/sudo/privacy b/recipes-extended/sudo/sudo/privacy
new file mode 100644
index 0000000..7c03615
--- /dev/null
+++ b/recipes-extended/sudo/sudo/privacy
@@ -0,0 +1 @@
+Defaults lecture = never
diff --git a/recipes-extended/sudo/sudo/sudoers.patch b/recipes-extended/sudo/sudo/sudoers.patch
new file mode 100644
index 0000000..aed0f10
--- /dev/null
+++ b/recipes-extended/sudo/sudo/sudoers.patch
@@ -0,0 +1,21 @@
+diff -uprN old/plugins/sudoers/sudoers.in new/plugins/sudoers/sudoers.in
+--- old/plugins/sudoers/sudoers.in 2015-10-31 18:34:59.000000000 -0500
++++ new/plugins/sudoers/sudoers.in 2017-04-20 10:32:19.530931283 -0500
+@@ -57,7 +57,7 @@
+ # Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
+ ##
+ ## Uncomment to use a hard-coded PATH instead of the user's to find commands
+-# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
++Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ ##
+ ## Uncomment to send mail if the user does not enter the correct password.
+ # Defaults mail_badpass
+@@ -85,7 +85,7 @@ root ALL=(ALL) ALL
+ # %wheel ALL=(ALL) NOPASSWD: ALL
+
+ ## Uncomment to allow members of group sudo to execute any command
+-# %sudo ALL=(ALL) ALL
++%sudo ALL=(ALL) ALL
+
+ ## Uncomment to allow any user to run sudo if they know the password
+ ## of the user they are running the command as (root by default).
diff --git a/recipes-extended/sudo/sudo_%.bbappend b/recipes-extended/sudo/sudo_%.bbappend
new file mode 100644
index 0000000..a1e4b04
--- /dev/null
+++ b/recipes-extended/sudo/sudo_%.bbappend
@@ -0,0 +1,12 @@
+SRC_URI += "file://sudoers.patch \
+ file://privacy"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+
+CONFFILES_${PN} += "${sysconfdir}/sudoers.d/privacy"
+
+do_install_append() {
+ install -D -m 644 ${WORKDIR}/privacy ${D}/${sysconfdir}/sudoers.d
+}
+