[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4


net Command

Purpose

Configures and controls Fast Connect servers.

Syntax

net [ help | start | stop | pause | resume | config | status | statistics | trace | user | share | name | session | (NBNS subcommands) ]

Description

The net command configures and controls Fast Connect servers.

Subcommands


help Displays help on the subcommand.
start Starts the server.
stop Stops the server.
pause Stops the server temporarily.
resume Resumes the paused server.
config Lists and changes configuration parameters for the server.
status Gives status of the server.
statistics Gives statistics on server resources.
trace Turns the server tracing on and off.
user Lists, adds, deletes, and modifies user accounts on the server.
share Lists, adds or deletes file and printer shares on the server.
name Lists, adds, or deletes server name aliases.
session Administrate user sessions on the server.
nblistnames Lists the NBNS name table.
nbbackup Writes the NBNS name table to a file.
nbrestore Restores the NBNS name table from a file.
nbaddname Adds a NetBIOS unique name to the NBNS name table.
nbaddgroup Adds a NetBIOS group name to the NBNS name table.
nbaddmulti Adds a NetBIOS multihomed name to the NBNS name table.
nbdelname Deletes a name from the NBNS name table.
nbaddingrp Adds a NetBIOS internet group name to the NBNS name table.
nbdeladdr Deletes an IP address in the NBNS name table of an NetBIOS internet group name.
nbstatus Gives status of NetBIOS Name Server.

net help Subcommand

Syntax
net help subcommand

or

net subcommand help

Description
Provides help information about the subcommands.

net start Subcommand

Purpose
Starts the server

Syntax
net start [/load]

Description
The start subcommand starts and initializes the server using parameters from the configuration file.

It can start the server only if the server process is already loaded but the server is in stopped (not running) state.

Note: Normally, instead of net start /load, you should use /etc/rc.cifs start to load and start the server, so that extra performance parameters are configured for AIX Fast Connect.

Flags

/load
Loads the server process if it is not already loaded.

 

Return Codes

0
The server (%s) is already running.

0
The server (%s) has started successfully.

1
Syntax error was detected: Unknown keyword or command option (%s).

2
The server (%s) could not be started because its process was not running.

3
The request is not valid for the current state of the server (%s).

4
Operation could not be performed.

 

net stop Subcommand

Purpose
Stops and unloads the server process.

Syntax
net stop [/unload]

Description
The net stop subcommand stops and unloads the server. It can stop the server only if it is running or paused. Once stopped, the server can be restarted using /etc/rc.cifs start.

Flags

/unload
Unloads the server process.

 

Return Codes

0
The server (%s) has stopped successfully.

0
The server (%s) has stopped and its process unloaded successfully.

1
Syntax error detected: Unknown keyword or command option (%s).

2
The request is not valid for the current state of the server (%s).

3
Error in unloading the server process on the server (%s).

4
Operation could not be performed.

5
Either cifsPrintServer is not running or it could not be terminated.

 

net pause Subcommand

Purpose
Pauses the server

Syntax
net pause

Description
The net pause subcommand pauses the server. It can pause the server only if it is running. Once paused, the server does not accept any new connections but continues serving the existing ones. It can be resumed with net resume.

Return Codes

0
The server (%s) has paused successfully.

1
Syntax error detected: Unknown keyword or command option (%s).

2
The request is not valid for the current state of server

3
Operation could not be performed.

 

net resume Subcommand

Purpose
Resumes the server.

Syntax
net resume

Description
The net resume subcommand resumes the server. It can resume the server only if it is paused. Once resumed, it starts accepting new connections.

Return Codes

0
The server (%s) has resumed successfully.

1
Syntax error detected: Unknown keyword or command option (%s).

2
The request is not valid for the current state of server

3
Operation could not be performed.

 

net config Subcommand

Purpose
Lists and changes the configuration parameters of the server.

Syntax1
net config

Syntax2
net config /component

Syntax3
net config /component:cname /parameter:value

Syntax4
net config [ /listparm ] [ /component:cname ] /parm:parameter

Description
The net config subcommand lists and changes the configuration parameters of the server. For example:

Syntax1
Lists the configuration parameters.

Syntax2
Lists all the components or groups of configuration parameters for the server.

Syntax3
Adds or changes the given parameter for the given component cname.

Syntax4
Lists the entry for the given parameter for the given component cname from the configuration file.

Note: Configuration parameters can only be changed by the root user.

 

Flags

/listparm
Lists the given parameter for the given component.

/component:cname
Specifies the component in the configuration file whose parameter needs to be added or changed. The default component is smbserver, the AIX Fast Connect server.

The parameter can be one of the following:

/maxconnections:number
Maximum number of connections to server resources. 0 specifies unlimited number.

/maxusers:number
Maximum number of users (sessions) that are permitted. 0 specifies unlimited number.

/autodisconnect:number
Timeout (in minutes) for inactive, unused sessions.

/maxopens:number
Maximum number of open files on the server. 0 specifies unlimited number.

/maxsearches:number
Maximum number of open searches on the server. 0 specifies unlimited number.

/servername:s_name
The name of the server.

/domainname:d_name
The name of the domain, server belongs to.

/guestname:g_name
Logon name as guest on the server.

/passthrough_authentication_server:pas_name
The name of the passthrough authentication server.

/backup_passthrough_authentication_server:bpas_name
The name of the backup passthrough authentication server.

/primary_wins_ipaddr:pwins_addr
Specifies the dotted IP address of the primary WINS server.

/secondary_wins_ipaddr:swin_ipaddr
Specifies the dotted IP address of the secondary WINS server.

/wins_proxy:0|1
Specifies whether or not the server has to act as WINS PROXY. Valid values are 0 for no and 1 for yes with 0 as the default.

/send_file_api:0|1
Specifies whether or not the send_file API is to be used. Valid values are 0 for off and 1 for on with 1 as the default.

/send_file_size:sf_size
If the send_file_api is 1 and the requested SMB read size is greater than the value of this parameter, send_file API will be used in the SMB operation. The value ranges between 1 and 4194304 with 4096 as the default value.

/send_file_cache_size:sfc_size
If the send_file_api is 1 and the requested SMB read size is less than the value of this parameter, the send_file API will cache the file. The value ranges between 0 and 4194304 with 0 as the default value which means that the send_file API will not cache the file.

/umask:u_mask
umask. It is an octal value and ranges between 0 and 0777 with 022 as the default.

/guestlogonsupport: 0|1
Specifies whether or not guest access is allowed. Valid values are 0 for no and 1 for yes with 0 being the default.

/dosattrmapping:0|1
If set to 1, then Archive, System, and Hidden attributes will be mapped to user, group, and other execute bits respectively. Otherwise, these attributes are not supported.

/dosfilenamemapping:0|1
If set to 1, long filenames will be mapped to 8.3 format. Otherwise long filenames will be truncated.

/dosfilenamemapchar:m_char
The character used to map long filenames to 8.3 format. Valid values are'~' and '^' with '~' being the default.

 

 

Return Codes

0
Command completed successfully.

1
Syntax error: Unknown keyword or command option (%s).

2
Command could not be executed. Invalid parameter value (%s).

3
Operation could not be performed.

 

Output for syntax1 command net config

        Server Name                                     ........
        Server Description                              ........
        Server Software version                         ........
        Domain Name                                     ........
        Primary WINS IP Address                         ........
        Secondary WINS IP Address                       ........
        Passthrough Authentication Server               ........
        Backup Passthrough Authentication Server        ........
        Guest logon ID                                  ........
       

Assuming that the smbserver has shares FILE0 and PRINT1 defined, and also has the following entries:

       servername = fcserver
       comment = Fast Connect server

Output for syntax2 command net config /component

        smbserver
        en
        FILE0
        PRINT1

Output for syntax4 command net config /parm:servername

        fcserver

Output for syntax4 command net config /parm:comment

        Fast Connect server

net status Subcommand

Purpose
Displays status of the server.

Syntax
net status

Description
The status subcommand displays status of the server. It tells whether the status of the server is running, paused, or stopped.

Return Codes

0
Server (%s) is running.

1
Syntax error: Unknown keyword or command option (%s).

2
Server (%s) is not running.

3
Server (%s) has been paused.

4
Operation could not be performed

 

net statistics Subcommand

Purpose
Displays the statistics on server resource usage.

Syntax
net statistics [ /reset ]

Description
Lists the statistics on server resources since it was started or resets the statistics.

Flags

/reset
Resets all statistic fields for the server.

 

Return Codes

0
Command completed successfully.

1
Syntax error: Unknown keyword or command option (%s).

2
Operation could not be performed.

 

Output

Server statistics for server (%s) since %s time
   Sessions started              .....
   Sessions timed out            .....
   Sessions dropped              .....
   Password Errors               .....
   Permission Errors             .....
   Bytes sent low                .....
   Bytes sent high               .....
   Bytes received low            .....
   Bytes received high           .....
   Request buffer failures       .....
   Big buffer failures           .....
   Print jobs queued             .....

net trace Subcommand

Purpose
Turns tracing on or off for the server.

Syntax1
net trace /on

Syntax2
net trace /off

Description
Turns tracing on or off for the server. The user does not have to start or stop the server.

Flags

/on
Turns tracing on.

/off
Turns tracing off.

 

Return Codes

0
Command completed successfully.

1
Syntax error: Unknown keyword or command option (%s).

2
Operation could not be performed.

 

net user Subcommand

Purpose
To list, add, delete, and modify AIX Fast Connect user accounts to support password encryption and client-to-server username mappings.

Syntax1
net user [username [ {password|-p} [/changeaixpwd:{yes|no}] ] [/active:{yes|no}] [/comment:text] [/serverUserName:srvUserName] ]

Syntax2
net user /add username {password|-p} [/changeaixpwd:{yes|no}] [/active:{yes|no}] [/comment:text]

Syntax3
net user /delete username

Syntax4
net user /map clientUserName srvUserName

Syntax5
net user /showmapping:username

Description
Syntax1 lists or modifies AIX Fast Connect user accounts.
Syntax2 adds a user on the server.
Syntax3 deletes the given user from the server.
Syntax4 maps a client user name to a server user name.
Syntax5 lists all the mappings related to the specified user name.

Parameters

username
The username of the account to list, add, delete, or modify -- either a client username or a server username.

clientUserName
The name of the user account on the client machine. 25 characters, maximum.

srvUserName
The name of the user account on the server machine. 8 characters, maximum.

password
The password to be assigned or changed for the account. All client usernames that map to this server account will be affected.

-p
Produces a prompt for the password. The password is not displayed when it is typed at the password prompt.

 

Flags

/add
Adds a AIX Fast Connect user account to support encrypted passwords.

/delete
Deletes the given AIX Fast Connect username mapping or encrypted password support.

/changeaixpwd:{yes|no}
Change the system password of the username to match the AIX Fast Connect user password -- requires root access.

/active:{yes|no}
Activates or deactivates the account. If the account is not active, the user cannot access the AIX Fast Connect server. The default is yes.

/comment:text
Provides a descriptive comment about the user's account. Enclose the text in quotation marks.

/serverUserName:srvUserName
The username specified is re-mapped to srvUserName.

/map
Creates a username mapping from clientUserName to srvUserName.

/showmapping:username
Shows all the client-name mappings for the given username.

 

Note: This subcommand manages a user database file (/etc/cifs/cifsPasswd) specific to AIX Fast Connect, which is used only for username-mapping and encrypted passwords. These two features operate independently, and are enabled/disabled by the configuration parameters usernamemapping and encrypt_passwords.

net share Subcommand

Purpose
To list, add and delete file or printer shares on the server.

Syntax1
net share [/netname:share_name] [/infolevel:N]

Syntax2
net share /add /netname:share_name [/type:{file|f}] /path:path_name [/desc:share_desc]
[/ro_password:password1] [/rw_password:password2]
[/mode:x] [/sh_oplockfiles:x] [/sh_searchcache:x] [/sh_sendfile:x]

Syntax3
net share /add /netname:share_name /type:{printer|p} /printq:qname [/print_options:ostr] [/desc:share_desc]

Syntax4
net share /delete /netname:share_name

Syntax5
net share /change /netname:share_name [/ro_password:password1] [/rw_password:password2]

Description
Syntax1 lists one or more shares.
Syntax2 adds a file share to the server.
Syntax3 adds a printer share.
Syntax4 deletes a share from the server.
Syntax5 changes password(s) of a file share.

Note: To change a share, you must first delete it and then add it again, except for file-share passwords.

Flags

/add
Adds a share to the server.

/delete
Deletes a share from the server.

/change
Changes properties of a file share.

/infolevel:N
Specifies the level of information desired. Default level is 1. Valid values are 0, 1, 2 and 99.

/type:type
Specifies the share type. Valid values are file (or f) and printer (or p). Default value is file.

/netname:share_name
Network-name of the share. Without this option, all shares will be listed.

/path:path_name
Absolute AIX pathname being exported by that file share.

/printq:qname
AIX print-queue being exported by that printer share.

/print_options:ostr
String specifying printer options.

/desc:desc
Brief description of the share.

/ro_password:password1
Share-level-security password for ReadOnly access. (Default is null.)

/rw_password:password1
Share-level-security password for ReadWrite access. (Default is null.)

/mode:x
File-share access mode -- 0:ReadOnly, 1:ReadWrite. (Default is 1.)

/sh_oplockfiles:x
Allows opportunistic locks to be used -- 0:Disabled, 1:Enabled. (Default is 0.)

/sh_searchcache:x
Allows search-caching to be used -- 0:Disabled, 1:Enabled. (Default is 0.)

/sh_sendfile:x
Allows SendFile API to be used -- 0:Disabled, 1:Enabled. (Default is 0.)

 

Return Codes

0
Command completed successfully.

1
Syntax error: Unknown keyword or command option (%s).

2
Operation could not be performed.

3
Command could not be executed. Invalid value (%s) of parameter.

4
Syntax Error: The share path or queue name must be specified.

5
Error adding the share - share name already exists.

6
Error deleting the share - share name not found.

7
The configuration file could not be updated to reflect the current change.

 

Output for info level 0 :

        netname1
        netname2
        ...
        netnameN

Output for info level 1 :

        Share Name    Share Type    Path Name/Queue Name   Share Description
        ----------    ----------    --------------------   ------------------
 
        netname1      File          /home/name/xxx         File Description
        netname2      Printer       lpq1                   Printer Description
        ......        ......        ....                   ..........
        netnameN      Printer       lpq2                   Printer Description

Output for info level 99 :

        netname:%s:type:%s:path:%s:printq:%s:print_options:%s:desc:%s::

net name Subcommand

Purpose
To list, add, and delete AIX Fast Connect server aliases (alternate NetBIOS names).

Syntax1
net name [ /list ]

Syntax2
net name /add aliasname [/sub:value]

Syntax3
net name /delete aliasname [/sub:value]

Description
Syntax1 lists all server aliases (NetBIOS names).
Syntax2 adds a server alias (NetBIOS name).
Syntax3 deletes a server alias (NetBIOS name).

Flags

/list
Lists all server aliases (NetBIOS names).

/add:aliasname
Adds a server alias (NetBIOS name).

/delete:aliasname
Deletes a server alias (NetBIOS name).

/sub:value
Allows any NetBIOS subcode, (hexadecimal 00 to FF), to be specified. Default is 00.

 

net session Subcommand

Purpose
To list and control user sessions connected to AIX Fast Connect.

Syntax1
net session

Syntax2
net session /user:Username /workstation:{IPaddress|NetBIOSname} [/fileinfo | /shareinfo]

Syntax3
net session /user:Username /workstation:{IPaddress|NetBIOSname} /close [/file:filename | /netname:sharename]

Description
Syntax1 lists connected user sessions.
Syntax2 lists files or resources in use by a connected user session.
Syntax3 closes a user session, or files or resources in use by a user session.

Flags

/user:Username
User name of the session.

/workstation:{IPaddress | NetBIOSname}
NetBIOS computer name or IP-address of the session.

/fileinfo
Lists statistics of files currently-open by the session (default).

/shareinfo
Lists statistics of share resources currently-used by the session.

/close
Closes specified user-session, file, or resource.

/file:filename
Full AIX pathname of file to be closed.

/netname:sharename
Share name resource to be closed.

 

Return Codes

0
Command completed successfully.

8
ERROR: Invalid Workstation Name '%s'.

231
ERROR: Missing user name or workstation name.

231
Syntax Error: Unknown command action keyword (%s).

 

Output for Syntax1:

User       Workstation    Open Files    Connection   Idle
                                        Time(days:hrs:mins:secs)
-------------------------------------------------------------------------------
user1      station1       10            10:23:45:33  00:00:55:21
user2      station2       0             00:03:45:33  00:00:20:21
 ...
userN      stationN       20            30:12:45:33  00:01:55:21

Output for Syntax2, fileinfo:

Open mode  Locks File name(s)
----------------------------------------------
r          0     /home/user3/test1.txt
w          3     /tmp/output.tmp

Output for Syntax2, shareinfo:

Share name    Connected  Path/Queue name
------------------------------------------------
HOME          1         $HOME
NETTEMP       1         /tmp

NBNS Subcommands

The following subcommands are used to administer the NetBIOS Name Server (NBNS) feature of AIX Fast Connect.

net nblistnames Subcommand

Purpose
To list the NetBIOS name table.

Syntax
net nblistnames

Description
Lists all names in the NetBIOS name table.

net nbaddname Subcommand

Purpose
To add a NetBIOS unique name to the NBNS name table.

Syntax
net nbaddname /name:name /ipaddress:ipaddress [ /sub:value ]

Description
Adds a NetBIOS unique name and its IP address to the NBNS name table.

Flags

/name:name
NetBIOS unique name to be added to the NBNS name table.

/ipaddress:ipaddress
IP-address (dotted decimal format) of the added NetBIOS unique name.

/sub:value
The NetBIOS subcode value is a hex number from 00-ff. The default is 00.

 

net nbaddgroup Subcommand

Purpose
To add a NetBIOS group name to the NBNS name table.

Syntax
net nbaddgroup /name:name /ipaddress:ipaddress [ /sub:value ]

Description
Adds a NetBIOS group name and its IP address to the NBNS name table.

Flags

/name:name
NetBIOS group name to be added to the NBNS name table.

/ipaddress:ipaddress
IP-address (dotted decimal format) of the added NetBIOS group name.

/sub:value
The NetBIOS subcode value is a hex number from 00-ff. The default is 00.

 

net nbaddmulti Subcommand

Purpose
To add a NetBIOS multihomed name to the NBNS name table.

Syntax
net nbaddmulti /name:name /ipaddress:ipaddress [ /sub:value ]

Description
Adds a NetBIOS multihomed name and its IP address to the NBNS name table.
If the name already exists in the name table and the name is a multihomed name, then ipaddress is added to its list of IP-addresses.

Flags

/name:name
NetBIOS multihomed name to be added to the NBNS name table.

/ipaddress:ipaddress
IP-address (dotted decimal format) of the NetBIOS multihomed name.

/sub:value
The NetBIOS subcode value is a hex number from 00-ff. The default is 00.

 

net nbdelname Subcommand

Purpose
To delete a NetBIOS name from the NBNS name table.

Syntax
net nbdelname /name:name [ /sub:value ]

Description
Deletes any type of permanent name from the NBNS name table.

Flags

/name:name
NetBIOS name to be deleted from the NBNS name table.

/sub:value
The NetBIOS subcode value is a hex number from 00-ff. The default is 00.

 

net nbaddingrp Subcommand

Purpose
To add a NetBIOS internet group name to the NBNS name table.

Syntax
net nbaddingrp /name:name /ipaddress:ipaddress

Description
Adds a NetBIOS internet group name and its IP address to the NBNS name table.
If the name already exists in the name table and the name is a internet group name, then ipaddress is added to its list of IP-addresses. There is a limit of 25 IP-addresses allowed per internet group.

Flags

/name:name
NetBIOS internet group name to be added to the NBNS name table.

/ipaddress:ipaddress
IP-address (dotted decimal format) of the NetBIOS internet group name.

 

net nbdeladdr Subcommand

Purpose
To delete an IP-address from a NetBIOS internet group name in the NBNS name table.

Syntax
net nbdeladdr /name:name /ipaddress:ipaddress

Description
Deletes an IP address of an NetBIOS internet group name from the NBNS name table. If there is more than one IP address associated with the internet group name, then just that IP address is deleted from its list. Otherwise, the internet group name is deleted, also.

Flags

/name:name
NetBIOS internet group name.

/ipaddress:ipaddress
IP-address (dotted decimal format) to be deleted.

 

net nbbackup Subcommand

Purpose
To backup the NetBIOS name table to a file.

Syntax
net nbbackup /file:filename

Description
Copies all of the entries that are in the NetBIOS name table to a file. This file should not be edited -- it should only be used as input to the net nbrestore command.

Flags

/file:filename
The name of the file that the NetBIOS name table is written to.

 

net nbrestore Subcommand

Purpose
To restore the NetBIOS name table from a file.

Syntax
net nbrestore /file:filename

Description
Copies all of the entries that are in the file into the NetBIOS name table to a file. This file should not be edited -- it should be the output file from the net nbbackup command.

Flags

/file:filename
The name of the file that the NetBIOS name table is restored from.

 

net nbstatus Subcommand

Purpose
To check the status of the NetBIOS Name Server.

Syntax
net nbstatus

Description
Prints the status of the NetBIOS Name Server (NBNS).


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]