0

I have a script that occasionally needs to run the command "service udev reload" but cannot as it needs root access. I don't want to stay logged in as root all the time, so I'm wondering if there is a way to change permissions for this command.

I'm on 12.04.

Any ideas?

1 Answers1

0

From the man page: sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.

So, this is the proper way to restart a service:

sudo service udev reload

if you do not want to do it by hand, you can always add an entry in crontab to execute the command at time intervals

girardengo
  • 5,005