一、新添加的用户在使用的过程中遇到提示“jenkins不在sudoers”文件中,这个问题主要是根据我自己遇到的问题描述给出解决方式。
在Jenkins的slave配置的过程中,新创建添加了一个jenkins用户,在slave上进行一些操作的过程中遇到一个提示说该用户不存在sudoers文件中,解决的方式,只需要修改/etc/sudoers文件,将新创建的jenkins用户添加到文件中就可以了
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
jenkins ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
问题解决。