473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

find login name of user?

Is there a function/module to find the login name of the user under
UNIX environment?

-ishwar

Dec 30 '06 #1
7 2158

<ra****@cps.cmich.eduwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...
Is there a function/module to find the login name of the user under
UNIX environment?
who
who am i
finger
id
Dec 30 '06 #2

karel wrote:
<ra****@cps.cmich.eduwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...
Is there a function/module to find the login name of the user under
UNIX environment?

who
who am i
finger
id
I was talking about under python environment.

-ishwar

Dec 30 '06 #3
ra****@cps.cmich.edu schrieb:
Is there a function/module to find the login name of the user under
UNIX environment?

http://docs.python.org/lib/os-procinfo.html

http://docs.python.org/lib/module-pwd.html
Dec 30 '06 #4

<ra****@cps.cmich.eduwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
>
karel wrote:
><ra****@cps.cmich.eduwrote in message
news:11**********************@v33g2000cwv.googleg roups.com...
Is there a function/module to find the login name of the user under
UNIX environment?

who
who am i
finger
id

I was talking about under python environment.
Ah! Thanks for enlightening me.
Apologies for misunderstanding.
Dec 30 '06 #5
Uwe Hoffmann wrote:
ra****@cps.cmich.edu schrieb:
>Is there a function/module to find the login name of the user under
UNIX environment?


http://docs.python.org/lib/os-procinfo.html

http://docs.python.org/lib/module-pwd.html
Speaking of that, is there any reason why there isn't any syntactic
sugar that gives the illusion of platform neutral fetching of the user name?

--
mph
Dec 30 '06 #6
In message <11**********************@v33g2000cwv.googlegroups .com>,
ra****@cps.cmich.edu wrote:
Is there a function/module to find the login name of the user under
UNIX environment?
Note that there isn't really an important concept of "login name" under *NIX
systems. There is the current process UID and GID, effective UID and GID
and so on, but these are just numbers, not names.

The OS doesn't remember anywhere the actual name that you used to login
with; this is conventionally saved in the USER environment variable, but
this is purely for informational purposes.
Dec 31 '06 #7
Martin P. Hellwig wrote:
Speaking of that, is there any reason why there isn't any syntactic
sugar that gives the illusion of platform neutral fetching of the user
name?
getpass.getuser() might come the closest:
http://docs.python.org/lib/module-getpass.html

--
Brian Beck
Adventurer of the First Order
Jan 1 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wayne Smith | last post by:
Applies to: Microsoft FrontPage 2000, Microsoft Access 2000, IIS 5.0 Operating System: Microsoft Windows 2000 Professional I am trying to protect a portion of a web site by allowing users to...
2
by: Tom Loach | last post by:
Our system administrator set up an NT server group in order to allow our users to login to our application via https to our sql server. The group appears as a User in SQL Server when you look at...
2
by: Gill Bates | last post by:
I'm trying to login to a banking site (https://www.providentconnection.com) using vb.net. I've tried many variations of WebClient and HttpWebRequest; none of which I've got to work. My latest...
3
by: NWx | last post by:
Hi, I have a ASP.NET application using forms authentication Default page is default.aspx, and login page is login.aspx As I perform authentication in Login page, I want to update a log table...
1
by: Friends | last post by:
Hi I need to set security for row level but not based on Database user's login. It should be based on the user table login. For the particular user I need to allow only the particular records to...
0
by: muder | last post by:
I have a standard Login ASP.NET 2.0 control on a login Page, a LoginName and LoginStatus controls on the member's page. once the user login successfully I am redirecting the user to Member.aspx...
0
bartonc
by: bartonc | last post by:
#Boa:Dialog:DBConnectDialog import wx ##"""Given a set if login specs, create a dbServer instance and ## ensure that there is a valid, open connection to the database. ## If not, set the...
5
by: rockdale | last post by:
Hi, all: I have a website with its own login page. Now one of my clients want their employees log into my website from their website. They want to have their login page (look and feel are...
2
by: dgbergman | last post by:
I have created a php login page in my site for my company. The goal is to get people into members area. Below is a list of steps that I take to create my login page in Dreamweaver CS3, can some one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.