Auto-selecting remote function type on net and help function

Steven French sfrench at
Mon Dec 3 12:58:07 GMT 2001

I also prefer not to require the administrator to specify the remoting
mechansim for most operations (some operations are best performed via RPC,
some perhaps via LDAP some via RAP but if server does not support the
remoting the 1st way, retrying the operation via RAP or LDAP or ...
automatically is ok).  The admin should not have to know ahead of time
which mechanism to try except in some rare cases.   Initially we intended
to create a plug in interface (ala the Sun & Linux PAM framework or the
OS/2 network plug-in framework or the NT/Win2K ntlmssp API) and the RAP
module and the DCE/RPC module would register if present and other remoting
mechanisms (such as SOAP or CIMON based) could be built in the future and
optionally added.    PAM used a conf file to specify the modules that are
registered which is probably overkill for the short term.    We started
with the RAP back end because it was the most widely interoperable, easier
to trace/debug and wasn't there (so we wouldn't be stepping on existing RPC

On the second question - I prefer that we keep the positional parms quite
limited (simply "object" and "action" - where "object" such as
user/group/groupmember/server/domain/service etc.  and "action" is
something like add/delete/list/info or near synonyms such as
create/remove/enumerate etc.)
     net <object> <action>  [target options] [misc options] [rpc type]
     net user delete some_user_name

or for joining a domain something like :
     net domain join -w SomeActiveDirectoryDomain -n MyMachineName etc.
or perhaps:
     net ads join -w SomeActiveDirectoryDomain -n MyMachineName etc.
or perhaps:
     net domainmember add -w SomeActiveDirectoryDomain -n MyMachineName

Having object/action synonyms would be very possible so it does not have to
be an either/or choice.   In an unrelated product a few years ago we
decided to handle those who accidently reversed object and action ("user
add"    was equivalent to "add user" was equivalent to "user create" etc.)

The reason we stayed with the object/action style ala Microsoft and IBM
"net" command was that it was familiar style and easy to explain compared
to some of the alternatives.   There was even some usability analysis of it
done a few years ago.

>Since net will (eventually) auto-detect whether to use RAP, RPC, or ADS,
>how should the help read?  For example,
>net rap user [misc. options] [targets]
>isn't quite right to me.  I'd like to propose:
>net [rap] user [misc. options] [targets]

Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at

More information about the samba-technical mailing list