Restart network service as user - Opensuse 12.1
Hi,
I have problem, where network fails to work after suspending machine. This happens very rarely, but is difficult to handle, because it is difficult to access terminal etc when network is down. Don't know why, but I can't even open terminal window in that state (application launcher is freezed too). I think this is caused by my nfs shares what are down and system tries to access them.
Anyway, I can recover when I restart networking service. But how can this be done automatically when machine wakes up from suspend? I have script what runs when I suspend machine. It sets kopete offline and after suspend to online. Also it sets alsamixer volume. But I can't add network restart command to it, because it runs as user rights, not as root.
So,
- Can I allow my user account right to restart networking service without password? To run it in suspend script?
- Or can restart command set to run automatically when system restores from suspend?
I tried to add this to sudoers:
myusername ALL = /etc/init.d/network
myusername ALL=(root) /sbin/service
But I can't still restart service without sudo command and password.
|