I have a script that I am running as a regular user (but one that can sudo). This script relates to BIND and gathers information each time it runs. It has not been working correctly and I noticed while looking at the file it says:

"If you're running BIND in a chroot environment, use this option to define a path to be chrooted. Please adjust also your sudo configuration to enable the user to chroot!"

I am runnning BIND in a chroot enviroment, and I can define the path to be chrooted. However, I have no idea how to adjust the sudo config to allow the user to chroot. I know to run visudo, but after that I do not know what exactly needs to be adjusted here.

I'm running RHEL server 6.7 and BIND 9.8.2

  • What is the output of sudo -l as the user you're attempting to run the script as? – John Sep 23 '15 at 19:16
  • Matching Defaults entries for <user> on this host: always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin User <user> may run the following commands on this host: (ALL) ALL – user53029 Sep 23 '15 at 19:24
  • In the future, please add any updates of that length to the original question with the proper formatting. – John Sep 23 '15 at 19:30

The important part of the output of sudo -l is the last line(s):

User <user> may run the following commands on this host: 
   (ALL) ALL

If what you mean by "allow the user to chroot" is "run the command chroot", then you already have that permission.

  • Ok. Just wanting to rule that out as a possible cause. I will give you the answer. Thanks! – user53029 Sep 23 '15 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.