-
sudo doesn't work on my Freetz-NG box.
I'm expecting it to do this:
Anyone knows how to fix this? BTW: /mod/etc/sudo.conf doesn't exist in either boxes (not on the working box nor on the non-working one). The working one is an old Freetz box compiled years ago. Working box:
Non-working box:
In make/pkgs/sudo/sudo.mk there's this line In the old Freetz the line is this: |
Beta Was this translation helpful? Give feedback.
Replies: 26 comments 8 replies
-
Maybe you need to set the lib path in the conf additional? Compile time looks good:
There are example files:
/mod/etc/sudoers is linked to /tmp/flash/sudo/sudoers which could be configured by webif. Changed this filename? |
Beta Was this translation helpful? Give feedback.
-
It's the /mod/etc/sudo.conf that's missing. It is also missing on the old working pre-fork one. I will now start to experiment with a completely new clone of freetz-ng
It's now compiling. I will edit this post later. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
The version in freetz-ng is much newer, as there was security problems like CVE-2021-3156 |
Beta Was this translation helpful? Give feedback.
-
Do you know if it has worked before in Freetz-ng? I don't think I'm able to get it working. Do you think someone who does, can find the time to get it working? |
Beta Was this translation helpful? Give feedback.
-
Someone needs to read the manual and place the files where they are needed. |
Beta Was this translation helpful? Give feedback.
-
I didn't know about araw /etc being able to mount the read-only fs. The system is however not complaining about /etc/sudo.conf, but about /mod/etc/sudo.conf ls -altr /mod/etc | grep sudo ls -altr /etc | grep sudo araw /etc drwxr-xr-x 2 root root 60 Jan 1 01:08 default.sudo BusyBox v1.36.1 (2023-10-17 12:15:25 CEST) built-in shell (ash) test@fritz:/mod/etc$ sudo ping -c 127.0.0.1
|
Beta Was this translation helpful? Give feedback.
-
Freetz hides all its libs in /usr/lib/freetz, avm bins dont know it and work like before. So avm could use a heavy patched or outdated lib and freetz its own. -> the dir where the .so is should be okay! But all freetz bins need to know where it is (RPATH above). sudo may need an additional line in its conf file for the path. |
Beta Was this translation helpful? Give feedback.
-
The example file is however effectively empty (after removing comments and empty lines)
I do not know enough about the building system, but isn't this an indication that sudoers.so is missing and is only on the development system?
The file libsudo_util.so is in build
|
Beta Was this translation helpful? Give feedback.
-
Oh, there are 2 libs needed now?
Does it not make more sense to use
for configure? Does this not prevent the 2nd .so? |
Beta Was this translation helpful? Give feedback.
-
I have confirmed it is listening to /mod/etc/sudo.conf
I then added Path plugin_dir /usr/lib/sudo/ to /mod/etc/sudo.conf
It merely corrected the error message I then changed that line to Path plugin_dir /usr/lib/freetz/ to /mod/etc/sudo.conf
I think the files sudoers.so should be in /usr/lib/freetz or in /usr/lib/sudo |
Beta Was this translation helpful? Give feedback.
-
Does not show anymore "sudoers.so" Can you test an image with such a binary. Or just copy the binary to the box:
|
Beta Was this translation helpful? Give feedback.
-
ls |
Beta Was this translation helpful? Give feedback.
-
Was the above output of find expected?
|
Beta Was this translation helpful? Give feedback.
-
I didn't have a new full compile and so there's no new firmware on my box!!! |
Beta Was this translation helpful? Give feedback.
-
Yes!!
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
With that line commented
|
Beta Was this translation helpful? Give feedback.
-
Build sudo static and without sudoers.so |
Beta Was this translation helpful? Give feedback.
-
The one with static is 798012 bytes, the "old one" was smaller and 331588 bytes. In case you're looking at the dates. |
Beta Was this translation helpful? Give feedback.
-
yes... Sorry, I thought you got it. It's the post that started with
|
Beta Was this translation helpful? Give feedback.
-
Thanks, I will be testing it some more and will also revert to the building environment that had all the other packages set. |
Beta Was this translation helpful? Give feedback.
-
Great! It seems i missed some posts, or the browser didnt updated. But i still down know if there is much difference betwen the size of
Maybe you could scroll up in the terminal... |
Beta Was this translation helpful? Give feedback.
-
I'm sorry, I have no idea how it works with the website and barely with cli |
Beta Was this translation helpful? Give feedback.
-
You dont need cli, only the website if only 1 file is changed!
Dont forget to reset your local changes, see the main README.md |
Beta Was this translation helpful? Give feedback.
Does not show anymore "sudoers.so"
Can you test an image with such a binary. Or just copy the binary to the box: