1logname(1)                       User Commands                      logname(1)
2
3
4

NAME

6       logname - return user's login name
7

SYNOPSIS

9       /usr/bin/logname
10
11
12   ksh93
13       logname
14

DESCRIPTION

16   /usr/bin/logname
17       The  logname  utility  writes the user's login name to standard output.
18       The login name is the string that would be returned by the getlogin(3C)
19       function.  Under  the  conditions  where getlogin() would fail, logname
20       will write a diagnostic message to standard error and exit with a  non-
21       zero exit status.
22
23   ksh93
24       The  logname  utility  writes the user's login name to standard output.
25       The login name is the string that would be returned by the getlogin(3C)
26       function.  If  getlogin() does not return successfully, the name corre‐
27       sponding to the real user IDof the calling process is used instead.
28

ENVIRONMENT VARIABLES

30       See environ(5) for descriptions of the following environment  variables
31       that  affect  the execution of logname: LANG, LC_ALL, LC_CTYPE, LC_MES‐
32       SAGES, and NLSPATH.
33

EXIT STATUS

35       The following error values are returned:
36
37       0     Successful completion.
38
39
40       >0    An error occurred.
41
42

FILES

44       /etc/profile      environment for user at login time
45
46
47       /var/adm/utmpx    user and accounting information
48
49

ATTRIBUTES

51       See attributes(5) for descriptions of the following attributes:
52
53
54
55
56       ┌─────────────────────────────┬─────────────────────────────┐
57       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
58       ├─────────────────────────────┼─────────────────────────────┤
59       │Availability                 │SUNWesu                      │
60       ├─────────────────────────────┼─────────────────────────────┤
61       │Interface Stability          │Committed                    │
62       ├─────────────────────────────┼─────────────────────────────┤
63       │Standard                     │See standards(5).            │
64       └─────────────────────────────┴─────────────────────────────┘
65

SEE ALSO

67       env(1), login(1), getlogin(3C),  utmpx(4),  attributes(5),  environ(5),
68       standards(5)
69
70
71
72SunOS 5.11                        11 Aug 2009                       logname(1)
Impressum