get_pwnam

Use the get_pwnam command to look up a UNIX user name in the /etc/passwd file on the ADEdit host computer. If there’s an entry for the specified user name, the command returns the profile values of that entry as a Tcl list. The get_pwnam command uses the NSS layer to perform the lookup operation. You can use the command to look up information for any user in the /etc/passwd file, including root.

Zone type

Not applicable

Syntax

get_pwnam unix_name

Abbreviation

gpn

Options

This command takes no options.

Arguments

This command takes the following argument:

Argument Type Description

unix_name

string

Required. Specifies the UNIX user name to search for in the /etc/passwd file.

Return value

This command returns a Tcl list of user profile attributes for a specified user if the specified user name is found in the local /etc/passwd file. If the command doesn’t find the specified user, it a “User not found” message.

Examples

get_pwnam adam

This example returns the profile for the UNIX user adam:

adam x 500 500 {Adam Andrews} /home/adam /bin/bash

Related commands

The following command performs actions related to this command:

  • getent_passwd returns a Tcl list of all entries in the local /etc/passwd file.