logname(3C)logname(3C)NAME
logname() - return login name of user
SYNOPSIS DESCRIPTION
returns a pointer to the null-terminated login name; it extracts the variable from the user's environment.
WARNINGS
returns a pointer to static data that is overwritten by each subsequent call.
This method of determining a login name is subject to forgery.
FILES SEE ALSO env(1), login(1), profile(4), environ(5), thread_safety(5).
STANDARDS CONFORMANCE logname(3C)
Check Out this Related Man Page
grpck(1B) SunOS/BSD Compatibility Package Commands grpck(1B)NAME
grpck - check group database entries
SYNOPSIS
/etc/grpck [filename]
DESCRIPTION
The grpck utility checks that a file in group(4) does not contain any errors; it checks the /etc/group file by default.
FILES
/etc/group
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO groups(1), group(4), passwd(4), attributes(5)DIAGNOSTICS
Too many/few fields
An entry in the group file does not have the proper number of fields.
No group name
The group name field of an entry is empty.
Bad character(s) in group name
The group name in an entry contains characters other than lower-case letters and digits.
Invalid GID
The group ID field in an entry is not numeric or is greater than 65535.
Null login name
A login name in the list of login names in an entry is null.
Logname not found in password file
A login name in the list of login names in an entry is not in the password file.
Line too long
A line (including the newline character) in the group file exceeds the maximum length of 512 characters.
Duplicate logname entry
A login name appears more than once in the list of login names for a group file entry.
Out of memory
The program cannot allocate memory in order to continue.
Maximum groups exceeded for logname
A login name's group membership exceeds the maximum, NGROUPS_MAX.
SunOS 5.10 10 Jan 2000 grpck(1B)
when we log into HP servers randomly we will get the message "logname: could not get the login name" if we open another connection we can login
we are running SSH 3.7
on OS B.11.23
this only happens on HP and only using ssh, I know there were problems like this on older ssh verisons but this... (0 Replies)
How would i do this in python
In bash i would do below and this would add the users logname to a file
This write the logname ie James to test.txt
But how would i do it in python this doesnt work below and ive tried different ways but cannot find an answer
But this just writes $(logname) to... (4 Replies)
Hi all,
I have a requirment , can anyone please guide me
Q) If the number of users are 50 or more it should print the login names of users who have logged in last 5 minutes and login names of users who have logged out in last 5 minutes.
Waiting for the reply
Thank you very much
... (1 Reply)
LOGNAME variable is set as READONLY in .profile.
I want to make it WRITEABLE so that I can modify the LOGNAME values programatically/throush shell programs.
Thanks,
Guru (1 Reply)
Hi,
I am wondering what is the difference between the USER and LOGNAME environment variables, and under what situations would they be different?
I am using Ubuntu 8.04 32-bit and I do not have 'login' command to test it. (7 Replies)
I have some comments about a previously closed topic whose name is the same as above
Omitted from the discussion was the situation with a "sudo command or sudo within a script".
There is an inconsistency between systems. On some systems $LOGNAME is invariant, on others,
on RedHat sudo... (3 Replies)