| | |
Problem loading module as not-root
Thread Solved |
Hi,
I need to load modules to connect to the internet, so I've created a script.
Script file is called 'connect.sh' is owned by root and has permissions set to 4755, so it is executed as root, even if run by non-root user (at least I think so). I still get errors:
When script comes to line '/sbin/modprobe pppoatm' it gives:
WARNING: Error inserting slhc (/lib/modules/2.6.24.4-64.fc8/kernel/drivers/net/slhc.ko): Operation not permitted
WARNING: Error inserting ppp_generic (/lib/modules/2.6.24.4-64.fc8/kernel/drivers/net/ppp_generic.ko): Operation not permitted
FATAL: Error inserting pppoatm (/lib/modules/2.6.24.4-64.fc8/kernel/net/atm/pppoatm.ko): Operation not permitted
Any idea?
PS: I really would like to avoid changing any other files than the script file 'connect.sh' if possible...
I need to load modules to connect to the internet, so I've created a script.
Script file is called 'connect.sh' is owned by root and has permissions set to 4755, so it is executed as root, even if run by non-root user (at least I think so). I still get errors:
When script comes to line '/sbin/modprobe pppoatm' it gives:
WARNING: Error inserting slhc (/lib/modules/2.6.24.4-64.fc8/kernel/drivers/net/slhc.ko): Operation not permitted
WARNING: Error inserting ppp_generic (/lib/modules/2.6.24.4-64.fc8/kernel/drivers/net/ppp_generic.ko): Operation not permitted
FATAL: Error inserting pppoatm (/lib/modules/2.6.24.4-64.fc8/kernel/net/atm/pppoatm.ko): Operation not permitted
Any idea?
PS: I really would like to avoid changing any other files than the script file 'connect.sh' if possible...
Funnily enough, just last week I wrote a little howto on this (see my website in my signature for more info). The reason for the problem you're experiencing is that while most *nix distributions work fine when the setuid bit on a binary is turned on, the distributions specifically disable the use of setuid bits on shell scripts, due to their insecure nature.
There are two possible workarounds: a) edit the sudoers file so that sudo doesn't require a password for the commands that you need to execute in your shell script, or b) call the script from a C program using the system() call.
There are two possible workarounds: a) edit the sudoers file so that sudo doesn't require a password for the commands that you need to execute in your shell script, or b) call the script from a C program using the system() call.
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
![]() |
Similar Threads
- No audio when using a Pinnacle PCTV card and BTTV drivers (*nix Hardware Configuration)
Other Threads in the Kernels and Modules Forum
- Previous Thread: running CentOS(fedora in vmware)
- Next Thread: Thinstation iptables state modul missing
| Thread Tools | Search this Thread |






