lscurrentuser

Use the lscurrentuser command to display information for the logged-in user.

Syntax

Read syntax diagramSkip visual syntax diagram lscurrentuser -nohdr-delimdelimiter

Parameters

-nohdr
(Optional) By default, headings are displayed for each column of data in a concise style view, and for each item of data in a detailed style view. The -nohdr parameter suppresses the display of these headings.
Note: If there is no data to be displayed, headings are not displayed.
-delim delimiter
(Optional) By default in a concise view, all columns of data are space-separated. The width of each column is set to the maximum width of each item of data. In a detailed view, each item of data has its own row, and if the headers are displayed, the data is separated from the header by a space. If you enter -delim : on the command line, the colon character (:) separates all items of data in a concise view; for example, the spacing of columns does not occur. In a detailed view, the data is separated from its header by the specified delimiter.

Description

The following attribute values can be displayed in the output:

Table 1. lscurrentuser output
Attribute Description
name Indicates the name of the current user.
role Indicates the role of the current user.
owner_id Indicates the ownership group ID of the current user.
owner_name Indicates the ownership group name of the current user.
password_expiry_time Indicates the time when the password expires for the current user.
multi_factor Indicates whether the user currently logged in is a member of a user group with multi-factor authentication enabled. Value can be yes or no.
password_sshkey_required Indicates whether the users currently logged in is a member of a user group with password and SSH key required. Value can be yes or no.
gui_disabled Indicates whether the users currently logged in is a member of a user group with GUI access disabled. Value can be yes or no.
cli_disabled Indicates whether the users currently logged in is a member of a user group with CLI access disabled. Value can be yes or no.
rest_disabled Indicates whether the users currently logged in is a member of a user group with REST-API access disabled. Value can be yes or no.

An invocation example

lscurrentuser

The resulting output:

name superuser
role SecurityAdmin
owner_id
owner_name
password_expiry_time
multi_factor yes
password_sshkey_required no
gui_disabled yes
cli_disabled no
rest_disabled yes