This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jhylton
Recipients
Date 2002-07-24.15:24:59
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=31392

This is not a Python bug.  Python is just calling the
platform getlogin().  On my Linux box, a C program that
calls getlogin() reports exactly the same error.  It returns
NULL and sets errno to ENOENT, which strerror() converts to
"No such file or directory."

The man page for getlogin on Linux says:

       For most purposes, it is more useful to use  the 
environ­
       ment  variable  LOGNAME to find out who the user is.
 This
       is more flexible precisely because the user can  set
 LOG­
       NAME arbitrarily.

The same man page describes cuserid() and says:

       Nobody knows precisely what cuserid() does - avoid 
it  in
       portable  programs  -  avoid  it  altogether  -  use
getp­
       wuid(geteuid()) instead, if that is what  you  meant.
  DO
       NOT USE cuserid().

History
Date User Action Args
2007-08-23 14:04:21adminlinkissue584566 messages
2007-08-23 14:04:21admincreate