How to Remotely manage a Windows service from Ubuntu machine

Via samba is possible to remotely restart a service on your Windows pc from your Linux machine.

In order to use this command, you’ll need to make sure that you have the
samba-common package installed for Ubuntu or any Debian-based Linux.

sudo apt-get install samba-common

Now you can list the services available on a Windows machine by using
the following command, making sure to use credentials that have
administrative privileges on the remote machine:

net rpc service list -I IPADDRESS -U USERNAME%PASSWORD

To stop the service:

net rpc service stop SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD

Then you can start the service again with the following command:

net rpc service start SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s