Insserv : commande introuvable

Anonymous user -  
mamiemando Posted messages 33541 Registration date   Status Modérateur Last intervention   -
Hello,

I hope you are doing well and in good health.

I have a problem when I run the command
insserv
: it says Command not found even though it is installed.

Anyone have any ideas? What should I do to fix this issue?

Thank you in advance.

3 réponses

douba
 
Hi,

Maybe it's because you're not using that command which requires administrator rights with the correct privileges? So try running it with sudo.
0
abir_8349
 
Thank you for your response... But I executed the command as root, and it displays that it is not found.
0
mamiemando Posted messages 33541 Registration date   Status Modérateur Last intervention   7 935
 
Hello,

Can you report the results of:

whoami echo $PATH whereis insserv


As a reminder, if you do not provide the absolute path to an executable (e.g.
/sbin/insserv
), your shell checks (in order) the directories listed in the environment variable
PATH
and stops as soon as it finds one. If none of the directories in your
PATH
contains an executable with that name, your shell will return command not found.

In the particular case of
insserv
, it is normally located in
/sbin
. This directory is referenced in your
PATH
if you are logged in as root, but not as a user. This command requires administrative rights and must therefore be run as root.

Example :

(mando@silk) (~) $ su -
Password :

(root@silk) (~) # insserv --help
Usage: insserv [<options>] [init_script|init_directory]
Available options:
-h, --help This help.
-r, --remove Remove the listed scripts from all runlevels.
-f, --force Ignore if a required service is missed.
-v, --verbose Provide information on what is being done.
-q, --silent Do not print warnings, only fatal errors.
-i, --insserv-dir Place dependency files in a location other than /lib/insserv
-p <path>, --path <path> Path to replace /etc/init.d.
-o <path>, --override <path> Path to replace /etc/insserv/overrides.
-c <config>, --config <config> Path to config file.
-n, --dry-run Do not change the system, only talk about it.
-s, --show-all Output runlevel and sequence information.
-u <path>, --upstart-job <path> Path to replace existing upstart job path.
-e, --recursive Expand and enable all required services.
-d, --default Use default runlevels as defined in the script


Note : If you are on Ubuntu, to become root, use
sudo su -
or enable the root account.

Good luck!
0