talimat 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Description: Give certain users (or groups) the ability to run some commands as root.
  2. # URL: http://www.sudo.ws
  3. # Packagers: milisarge@gmail.com
  4. # Depends on: pam
  5. name=sudo
  6. version=1.8.15
  7. release=1
  8. source=(http://www.sudo.ws/sudo/dist/$name-$version.tar.gz)
  9. build() {
  10. cd $name-$version
  11. ./configure --prefix=/usr \
  12. --libexecdir=/usr/lib \
  13. --docdir=/usr/share/doc/sudo-$version \
  14. --with-all-insults \
  15. --with-env-editor \
  16. --without-sendmail \
  17. --with-passprompt="[sudo] password for %p: "
  18. make
  19. make DESTDIR=$PKG install
  20. mkdir -pv $PKG/etc/pam.d
  21. cat > $PKG/etc/pam.d/sudo << "EOF" &&
  22. # Begin /etc/pam.d/sudo
  23. # include the default auth settings
  24. auth include system-auth
  25. # include the default account settings
  26. account include system-account
  27. # Set default environment variables for the service user
  28. session required pam_env.so
  29. # include system session defaults
  30. session include system-session
  31. # End /etc/pam.d/sudo
  32. EOF
  33. chmod 644 $PKG/etc/pam.d/sudo
  34. echo "%wheel ALL=(ALL) ALL" >> $PKG/etc/sudoers
  35. }