Managing users from the command line

You can add, modify or delete users on a host using the user command line utility iftpaddu.exe.

Important: You cannot use this utility to add users to a host that uses an Active Directory database, Microsoft Windows user database or external LDAP database.

To run the Add User Utility:

  1. From the Windows desktop, select Start > Run. The Run dialog appears.
  2. Enter cmd.exe and click OK.
  3. Change the directory to the WS_FTP Server directory. For a default installation, this should be C:\Program Files\Ipswitch\WS_FTP Server\.
  4. For a list of command options, enter iftpaddu /?.

Basic Command Syntax

The basic syntax for adding, modifying and removing a user, as well as the syntax to change permissions for all users on the server at once, are indicated below.

Adding a User

iftpaddu -u userid -h hostname [-n "full name"] [-p password] [options]

Modifying a User

iftpaddu -mod -u userid -h hostname [-n "full name"] [-p password] [options]

Deleting a User

iftpaddu -kill -u userid -h hostname

Modifying All Users on a Host

iftpaddu -all -h hostname [options]

Note: All arguments are case-sensitive and must be supplied as lower case.

Note:When using the +/-root and +/-lock command line switches, the command lock switch must precede the root switch, otherwise the the command line will fail.

Arguments

When to use

-add

Use when you want to add a new user.  If -add, - mod, -kill or -all are not specified, -add is assumed.

-mod

Use when you want to modify an existing user.

-kill

Use to delete a user. You must also specify a username using -u userid.

-all

This argument can be used in conjunction with the active, chgpass, sysadm, hostadm, lock and g (group) arguments to modify all users on the server.

-f filename

Specifies an external file from which to read additional arguments.

-u username

Adds a username, where username the user you want to add. This is the only required argument. Only one username can be added in a single command.

-h hostname

Specifies the user's host, where hostname is the name of the file transfer host. The primary FTP host is used if no host is specified.

-n "full name"

Specifies the full name of the user. The full name must be enclosed in quotes if it contains any spaces.

-o /homefolder

Specifies a home folder for a user.

-p password

Specifies the password for a user.

+g groupname

Adds the user to the specified group.

-g groupname

Removes the user from the specified group.

-s

Sets the quota space for the user. (The minimum to enter is 1024. Less than this number will enter a "0" as the quota space.)

-x

Sets the file count quota for the user.

+active

Enables the user to log on. This is the default setting when adding a new user.

-active

Disables the user account, so the user cannot log in.

+chgpass

Enables the user to change password from an FTP client.

-chgpass

Disables the user's ability to change password from an FTP client.

-e emailaddress

Sets the email address for the specified user.

+forcechgpass

Forces the user to change the password on next login from an FTP client. For more information on functionality of this option, see the "User must change password at next logon" option in Creating user accounts.

-forcechgpass

Disables the force change password option.

+hostadm

Grants the user Host Administrator permissions.

-hostadm

Removes Host Administrator permissions from the user.

-list

Outputs a list of the commands needed to generate all of the users on a host in a format that can be used with the -f argument. If -u is specified, only the commands needed to generate the specified user are output. Examples:
iftpaddu -u admin -h serverhostname -list
iftpaddu -h serverhostname -list

+lock

Locks a user to their home folder.

-lock

Unlocks a user from their home folder.

+root

Displays the user home folder as root (/), effectively hiding the path to the location.
To set this option, +lock must also be set for the user.

-root

Displays the full path to the user's home folder, for example /users/fredf

+sysadm

Grants the user System Administrator permissions.

-sysadm

Removes System Administrator permissions from the user.