Cross-compiling sudo

Source: Internet
Author: User

Compiling sudo version 1.8.6p7
Download path: https://www.sudo.ws/news.html

1. Cross-compiling

#Tar-xvfsudo-1.8.6p7.Tar. GZ # CDsudo-1.8.6p7/# mkdirbuild#./configure--prefix=/home/carrie/sudo/sudo-1.8.6p7/build/cc=aarch64-linux-gnu-GCCar=aarch64-linux-gnu-ar--host=aarch64-linux-gnu# Make& Make Install# lsbuild/#编译产生的文件bin include libexec sbin share

2. Copy files to arm board
Compiled a lot of files, in fact, the useful files only two sudo and sudoers.so, just need to copy the two files to the corresponding directory of ARM board is good

#CP sudo/usr/bin/sudo#CPsudoers.so/usr/local/libexec/sudoers.sosudoModify the permission settings: #chmod 622/usr/bin/sudo# chmodu+s/usr/bin/sudo # ls-al/usr/bin/sudo-rws--x--x1Root root519080Oct -  the: the/usr/bin/sudo
Explanation: # # # U+s:setuid: This bit is a program or command that allows a normal user to run only the root account in the root user's role.

3. Create/etc/sudoers on ARM board

# vim/etc/sudoersallall'Defaults targetpw'
# # #这一步可以保证sudo可以被普通用户使用



Cross-compiling sudo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.