Search code examples
ubuntuservicesambarunlevel

How to change the priority of service in run levels on ubuntu?


I have tried to change the priority of samba on run level 2 by renaming the S16samaba to S21samba.

mv S16samaba S21samaba

But when I reboot the server it starts before other services which are low priority like S12ntp.

I have also tried using update-rc.d command.

update-rc.d samba start 80 2 3 4 5

This command renamed S21samba back to S16samba. And it doesn't work.

I want to start the samba after all other services are started.

Please give me suggestion with the idea of priority of service in run levels.


Solution

  • The reason your approaches do not work it that they assume a system V init. Ubuntu does not use system V init. It either uses upstart or systemd depending on version. I do not believe either system uses run levels which is a tragic step back for such "advanced" systems.