Files
ocserv/doc/ocpasswd.8.md
Grigory Trenin 08c321c41a docs: tidy up man pages
- Updated the SYNOPSIS of ocserv(8), occtl(8), and ocpasswd(8)
  to match their --help output
- Corrected usage syntax (eg: '-c config' is optional for ocserv,
  'username' is required for ocpasswd).
- Removed non-standard ':' trailing from options definitions
- Documented missing command-line options: --log-stderr,  --syslog,
  --no-chdir, --traceable
- Added default configuration file paths:
  /etc/ocserv/ocserv.conf, /etc/ocserv/ocpasswd
- Documented USER_AGENT environment variable
- Fixed typos

Signed-off-by: Grigory Trenin <grigory.trenin@gmail.com>
2026-01-10 18:05:02 -05:00

1.8 KiB

ocpasswd(8) -- OpenConnect server password utility

SYNOPSIS

ocpasswd [ -flag [] | --option-name[[=| ]] ]...

DESCRIPTION

This program is openconnect password (ocpasswd) utility. It allows the generation and handling of a 'plain' password file used by ocserv.

OPTIONS

  • -c, --passwd=FILE: Specify the password file to use. Only useful when not using the default location. The default is /etc/ocserv/ocpasswd.

  • -g, --group: Specify the user's group name. Note that groups of one character such as '*' and 'x', are ignored.

  • -d, --delete: Deletes the specified user from the password file.

  • -l, --lock: Prevents the specified user from logging in by locking its password.

  • -u, --unlock: Re-enables login for the specified user by unlocking its password.

  • -h, --help: Display usage information and exit.

  • -v, --version: Output version of program and exit.

EXIT STATUS

  • 0: Successful program execution.

  • 1: The operation failed or the command syntax was not valid.

FILES

The password format of ocpasswd is as follows.

username:groupname:encoded-password

The crypt(3) encoding is used for the encoded-password.

EXAMPLES

Adding a user

$ ocpasswd -c ocpasswd my_username

Locking a user

$ ocpasswd -c ocpasswd -l my_username

Unlocking a user

$ ocpasswd -c ocpasswd -u my_username

AUTHORS

Written by Nikos Mavrogiannopoulos. Many people have contributed to it.

REPORTING BUGS

Issue tracker: https://gitlab.com/openconnect/ocserv/-/issues

Copyright (C) 2013-2024 Nikos Mavrogiannopoulos and others, all rights reserved. This program is released under the terms of the GNU General Public License, version 2.

SEE ALSO

ocserv(8), occtl(8)