LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   net command gone (http://www.linuxquestions.org/questions/linux-networking-3/net-command-gone-852713/)

wisnoskij 12-27-2010 09:21 PM

net command gone
 
I have been using the net command for a while now to remotely shutdown my windows machine, I believe that it comes with the samba package.
"net rpc shutdown -f -I IP_ADDRESS -U USERNAME%PASSWORD"

I run a Ubuntu 10.10 x86 Netbook edition computer, and have recently updated my software because my computer asked me to and the net command recently stopped working so I assume this is the cause.
It was simply saying that the net command did not exist, but after playing around installing packages I installed samba4 and got it recognizing the command net. But it no longer works the same and does not support "rpc shutdown" nor does it appear to have any replacement for it.

Was the command simply depreciated? if so how can I stop this from happening again, I use net all the time and am not happy that it would disappear without warning.

Can I get the command back somehow, or do any of your have a replacement?

Any help would be appreciated.

andrewthomas 12-27-2010 10:21 PM

Shutdown should still be a valid option.
Code:

NET(8)                    System Administration tools                  NET(8)

NAME
      net - Tool for administration of Samba and remote CIFS servers.

SYNOPSIS
      net {<ads|rap|rpc>} [-h] [-w workgroup] [-W myworkgroup] [-U user]
        [-I ip-address] [-p port] [-n myname] [-s conffile] [-S server] [-l]
        [-P] [-d debuglevel] [-V] [--request-timeout seconds]

DESCRIPTION
      This tool is part of the samba(7) suite.
COMMANDS

  RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]
      Shut down the remote server.

      -r
          Reboot after shutdown.

      -f
          Force shutting down all applications.

      -t timeout
          Timeout before system will be shut down. An interactive user of the
          system can use this time to cancel the shutdown.

      -C message
          Display the specified message on the screen to announce the
          shutdown.

Check
Code:

man net
on your machine. I just posted the relevant part of the entry on mine.

wisnoskij 12-28-2010 07:14 AM

Sorry should of included that with my post. It has a really strange output.

Code:

wisnoskij@Netbook-X61:~$ man net
No manual entry for net
See 'man 7 undocumented' for help when manual pages are not available.
wisnoskij@Netbook-X61:~$ net
Unknown parameter encountered: "max log size"
Ignoring unknown parameter "max log size"
Unknown parameter encountered: "syslog"
Ignoring unknown parameter "syslog"
Unknown parameter encountered: "unix password sync"
Ignoring unknown parameter "unix password sync"
Unknown parameter encountered: "passwd program"
Ignoring unknown parameter "passwd program"
Unknown parameter encountered: "pam password change"
Ignoring unknown parameter "pam password change"
Unknown parameter encountered: "map to guest"
Ignoring unknown parameter "map to guest"
Unknown parameter encountered: "usershare allow guests"
Ignoring unknown parameter "usershare allow guests"
Unknown parameter encountered: "writeable"
Ignoring unknown parameter "writeable"
Unknown parameter encountered: "valid users"
Ignoring unknown parameter "valid users"
Unknown parameter encountered: "writeable"
Ignoring unknown parameter "writeable"
Unknown parameter encountered: "valid users"
Ignoring unknown parameter "valid users"
Unknown parameter encountered: "writeable"
Ignoring unknown parameter "writeable"
Unknown parameter encountered: "valid users"
Ignoring unknown parameter "valid users"
Usage:
net <command> [options]
Available commands:
        password        Changes/Sets the password on a user account [server connection needed]
        samdump                dump the sam of a domain
        samsync                synchronise into the local ldb the sam of an NT4 domain
        drs                Implements functionality offered by repadmin.exe utility in Windows
        gpo                Administer group policies
        setexpiry        Sets the expiration of a user account
        fsmo                Makes the targer DC transfer or seize a fsmo role [server connection needed]
        pwsettings        Sets password settings
        group                Group management
        machinepw        Gets a machine password out of our SAM
        rodc                RODC commands
        domainlevel        Raises domain and forest function levels
        acl                NT ACLs manipulation
        vampire                Join and synchronise a remote AD domain to the local server [server connection needed]
        enableaccount        Enables a user
        export                Dumps the sam of the domain we are joined to [server connection needed]
        user                User management [server connection needed]
        spn                SPN management [server connection needed]
        time                Retrieve the time on a remote server [server connection needed]
        setpassword        (Re)sets the password on a user account
        join                Joins domain as either member or backup domain controller [server connection needed]
        newuser                Creates a new user



All times are GMT -5. The time now is 10:30 PM.