DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-08-21 20:56:03

blueberry
Member
Registered: 2010-07-09
Posts: 5

samba net command.

Hi,

I have made myself a php-based website that I run on my 323 which pings the PCs in my house, shows their status, and allows me to turn them on if they are off using wake on lan. Everything is working very well, so now I am trying to add the ability to remotely shutdown a windows pc from the same interface. I got the following command from a google search on the subject:
net rpc shutdown -I IPADDRESS -U USERNAME%PASSWORD

This is supposedly a samba command but when I type net into my root shell, I get the following error

root@nas:~# net
-sh: net: not found


Is there a way to get this command to work from the shell on the 323?

Thanks!

Offline

 

#2 2010-08-22 13:22:46

Stargrove1
Member
Registered: 2010-08-11
Posts: 16

Re: samba net command.

Unfortunately I could not help, but I was loking for what you have done. I would like to start/stop commands/deamons with a web interface. Is it possible that you could write a small guide how to do this and/or provide an example code? Thanks in Advance.

Offline

 

#3 2010-08-22 13:41:15

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: samba net command.

The samba pacakage includes the rpcclient program that might help you. See man rpcclient for details.

Offline

 

#4 2010-08-23 01:39:25

blueberry
Member
Registered: 2010-07-09
Posts: 5

Re: samba net command.

thank you Fonz,

I did not realize that there was a separate samba package available for ffp. I looked into the file and saw 'net' so i installed it and it works. I don't even need to run that version of samba... I just needed the tool. Everything is working great now.

Stargrove1 I am using PHP. In PHP you can use the exec('blah') function to execute shell commands.

If you know much about PHP javascript and html you can easily make a webpage with some ajax on it to write to and read the console. If you need a little starter.. let me know.

Offline

 

#5 2010-08-23 12:11:36

Stargrove1
Member
Registered: 2010-08-11
Posts: 16

Re: samba net command.

I gueass I need a little more than just a little starter yikes) I am fine with html, but I never touched php, perl, ajax or anything else. I would appreciate your help.

Offline

 

#6 2010-08-23 15:59:30

scaramanga
Member
Registered: 2010-08-04
Posts: 251

Re: samba net command.

Stargrove1 wrote:

I gueass I need a little more than just a little starter yikes) I am fine with html, but I never touched php, perl, ajax or anything else. I would appreciate your help.

What I usually do if I need to get started quickly with web programming is head over to http://www.w3schools.com/. Worked great for me so far.


DNS-323 HW Rev. C1 FW 1.10 fun-plug 0.5
2 x WD10EARS-00Y5B1 in Standard mode (LCC set to 5 min; Aligned to 4K)
Transmission with Transmission Remote GUI

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB