We would have to know what's in the sudoers(5) file to be completely sure of how to proceed.the command works if I don't use sudo but seg faults if I do.
1. command
2. sudo command
3. sudo /bin/sh
command
exit
4. su
command
exit
We would have to know what's in the sudoers(5) file to be completely sure of how to proceed.
However, it's probably sufficient to investigate the following four scenarios of running the "command". We know that 1 works, and 2 produces SIGSEGV. Do you get SIGSEGV for cases 3 and 4:
Is there a core file produced in the current working directory when you get SIGSEGV? What is its name? We expect "*.core" where "*" is the name of the binary executable that received SIGSEGV.Code:1. command 2. sudo command 3. sudo /bin/sh command exit 4. su command exit
We would have to know what's in the sudoers(5) file to be completely sure of how to proceed.
However, it's probably sufficient to investigate the following four scenarios of running the "command". We know that 1 works, and 2 produces SIGSEGV. Do you get SIGSEGV for cases 3 and 4:
Is there a core file produced in the current working directory when you get SIGSEGV? What is its name? We expect "*.core" where "*" is the name of the binary executable that received SIGSEGV.Code:1. command 2. sudo command 3. sudo /bin/sh command exit 4. su command exit
ldd /usr/local/bin/sudo
truss sudo pwd >/tmp/trace 2>&1
ulimit -c unlimited
. Try sudo again. Check for core file.Side note: Why do you want to use sudo if you are connecting to jail already as root ?
To trace the problem, as gpw928 stated: provide ldd and truss output.
To get the core file make sure limits are set properly. Once you jexec to the jail setulimit -c unlimited
. Try sudo again. Check for core file.
I actually miss the segmentation error in syslog that Linux provides (you can see what address caused the segmentation fault and where).
Running inside a jail makes a significant difference.
I'm not particularly competent with jails, and so should defer to somebody who is.
Please confirm that the problem only occurs inside the jail. Do you have more than one jail? Does it happen in any other jail?
What do you see if you list the dynamic dependencies of the sudo command both inside and outside the jail:
.Code:ldd /usr/local/bin/sudo
Try running truss on the sudo command and save the output using a Bourne shell:
Compare the output to the same thing outside the jail.Code:truss sudo pwd >/tmp/trace 2>&1