From a2b71a0141763c20552bb45eeb4cb78c4b513118 Mon Sep 17 00:00:00 2001
From: bubulle
Print out sam database of remote server. You need to run this against the PDC, from a Samba machine joined as a BDC.
Export users, aliases and groups from remote server to local server. You need to run this against the PDC, from a Samba machine joined as a BDC. -
Print out status of machine account of the local machine in ADS.
Prints out quite some debug info. Aimed at developers, regular
-users should use NET ADS TESTJOIN
.
EXPRESSION
ATTRIBUTES...
Perform a raw LDAP search on a ADS server and dump the results. The expression is a standard LDAP search expression, and the attributes are a list of LDAP fields to show in the results.
Example: net ads search '(objectCategory=group)' sAMAccountName
-
DN
(attributes)
Perform a raw LDAP search on a ADS server and dump the results. The DN standard LDAP DN, and the attributes are a list of LDAP fields to show in the result. -
Example: net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName
+
Example: net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName
(Re)Create a BUILTIN group. Only a wellknown set of BUILTIN groups can be created with this command. This is the list of currently recognized group names: Administrators, @@ -190,78 +188,78 @@ compatible Access. This command requires a running Winbindd with idmap allocation properly configured. The group gid will be allocated out of the winbindd range. -
Create a LOCAL group (also known as Alias). This command requires a running Winbindd with idmap allocation properly configured. The group gid will be allocated out of the winbindd range. -
Map an existing Unix group and make it a Domain Group, the domain group will have the same name. -
Add a member to a Local group. The group can be specified only by name, the member can be specified by name or SID. -
Remove a member from a Local group. The group and the member must be specified by name. -
List the specified set of accounts by name. If verbose is specified, the rid and description is also provided for each account. -
Set the workstations a user account is allowed to log in from. -
Set or unset the "password must change" flag for a user account. -
Set a value for the account policy. Valid values can be: "forever", "never", "off", or a number. -
Only available if ldapsam:editposix is set and winbindd is running. Properly populates the ldap tree with the basic accounts (Administrator) and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree. -
Dumps the mappings contained in the local tdb file specified. This command is useful to dump only the mappings produced by the idmap_tdb backend. -
Store a secret for the specified domain, used primarily for domains that use idmap_ldap as a backend. In this case the secret is used as the password for the user DN used to bind to the ldap server. -
Starting with version 3.0.23, a Samba server now supports the ability for non-root users to add user defined shares to be exported using the "net usershare" commands.
@@ -290,7 +288,7 @@ can create user defined shares on demand using the commands below.
net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share. |
net usershare delete sharename - to delete a user defined share. |
net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share. |
net usershare list [-l|--long] [wildcard sharename] - to list user defined shares. |
-
sharename
path
[comment]
[acl]
[guest_ok=[y|n]]
+
sharename
path
[comment]
[acl]
[guest_ok=[y|n]]
Add or replace a new user defined share, with name "sharename".
"path" specifies the absolute pathname on the system to be exported. @@ -327,11 +325,11 @@ sharename as the one you wish to modify and specify the new options you wish. The Samba smbd daemon notices user defined share modifications at connect time so will see the change immediately, there is no need to restart smbd on adding, deleting or changing a user defined share. -
sharename
Deletes the user defined share by name. The Samba smbd daemon immediately notices this change, although it will not disconnect any users currently connected to the deleted share. -
[-l|--long]
[wildcard sharename]
Get info on user defined shares owned by the current user matching the given pattern, or all users.
net usershare info on its own dumps out info on the user defined shares that were @@ -350,7 +348,7 @@ guest_ok=n And is a list of the current settings of the user defined share that can be modified by the "net usershare add" command. -
[-l|--long]
wildcard sharename
List all the user defined shares owned by the current user matching the given pattern, or all users.
net usershare list on its own list out the names of the user defined shares that were @@ -358,7 +356,7 @@ created by the current user, or restricts the list to share names that match the wildcard pattern ('*' matches one or more characters, '?' matches only one character). If the '-l' or '--long' option is also given, it includes the names of user defined shares created by other users. -
Starting with version 3.2.0, a Samba server can be configured by data stored in registry. This configuration data can be edited with the new "net conf" commands.
@@ -376,10 +374,10 @@ See the
+
Print the configuration data stored in the registry in a smb.conf-like format to
standard output.
-
This command imports configuration from a file in smb.conf format.
If a section encountered in the input file is present in registry,
its contents is replaced. Sections of registry configuration that have
@@ -389,30 +387,30 @@ Optionally, a section may be specified to restrict the effect of the
import command to that specific section. A test mode is enabled by specifying
the parameter "-T" on the commandline. In test mode, no changes are made to the
registry, and the resulting configuration is printed to standard output instead.
-
Show the definition of the share or section specified. It is valid to specify
"global" as sharename to retrieve the global configuration options from
registry.
- Create a new share definition in registry.
+ Create a new share definition in registry.
The sharename and path have to be given. The share name may
not be "global". Optionally, values for the very
common options "writeable", "guest ok" and a "comment" may be specified.
The same result may be obtained by a sequence of "net conf setparm"
commands.
-
Store a parameter in registry. The section may be global or a sharename.
The section is created if it does not exist yet.
-
Get the list of includes for the provided section (global or share).
Note that due to the nature of the registry database and the nature of include directives,
@@ -428,14 +426,14 @@ per share, and this list is evaluated after all the parameters of the share.
Further note that currently, only files can be included from registry
configuration. In the future, there will be the ability to include configuration
data from other registry keys.
-CONF LIST
CONF LIST
CONF IMPORT
[--test|-T]
filename
[section]
CONF SHOWSHARE
sharename
CONF ADDSHARE
sharename
path
[writeable={y|N}
[guest_ok={y|N}
[comment
]]] CONF ADDSHARE
sharename
path
[writeable={y|N}
[guest_ok={y|N}
[comment
]]] CONF SETPARM
section
parameter
value
CONF GETINCLUDES
section