LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-02-2012, 01:14 AM   #1
linkaran
LQ Newbie
 
Registered: Aug 2012
Posts: 17

Rep: Reputation: Disabled
Data Structures specific to a user in kernel


I would like to know if there is a data structure specific to a user which describes its status and other information? For instance,a task structure to a process. The names of users can be extracted from etc/passwd but I am not able to find the data structure created for a user.
 
Old 08-02-2012, 08:17 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Processes, files, and so-forth have a uid (user-id) and gid (group-id) field, both of which are numbers.

Now, one of the reasons why the kernel seems a bit "mum" as to exactly "who you are," is that the dual objectives of authentication and authorization can in fact be quite complicated, as can such issues as regulating file and resource access. Linux has a PAM = Pluggable Authentication Modules infrastructure which allows it to delegate many of these operations in a very generic way. It might be using a password-file, or it might be relying upon an LDAP or a Kerberos corporate-wide (or submarine-wide?) network. When viewed in the general sense, as computers are wot to do, it can become tricky indeed.
 
Old 08-05-2012, 07:51 AM   #3
linkaran
LQ Newbie
 
Registered: Aug 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thank you for the reply. The kernel does seem "mum" about the users after all.
 
Old 08-09-2012, 01:45 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
The kernel delegates all authentication and authorization tasks to PAM, and it maintains in its data structures only the "tokens" (so to speak...) that are needed by its own internal mechanisms. You see how the "traditional" authentication and authorization mechanisms of Unix have been abstracted away in Linux's present design.

Consider the scenarios of which a particular Linux box might be only a tiny part ... an installation that might have 18,000 computers in it ... serving hundreds of thousands of employees and countless internal service processes. All managed from a single (distributed...) administration source. (And oh by the way, the security grade is "Top Secret: Crypto.") "Password files" and even "shadow files" are but a distant memory. Linux is called-upon to work there, and it does. Seamlessly cooperating with all the other types of computers, 24/7/365, with uptime measured in years. It's quite the thing to see, I assure you.

Last edited by sundialsvcs; 08-09-2012 at 01:46 PM.
 
Old 08-11-2012, 11:59 PM   #5
linkaran
LQ Newbie
 
Registered: Aug 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
From what I read on PAM,I understand that PAM gives a complete control over how users are authenticated. But if you take it a notch down and want to check what a user status is from when it logged out the last time,how can that be done? To be specific,while doing a system resume(from s4 state),I want to check which of the users are in which state(powered off or s3 state or s4 state...).So at what level should I be looking for to extract this kind of information?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
from kernel data structures ? sha_neb Linux - Kernel 1 06-08-2007 03:54 PM
from kernel data structures ? sha_neb Programming 1 06-07-2007 09:53 AM
data structures used by ls command vishalbutte Programming 1 01-19-2006 02:47 PM
kernel data structures vishalbutte Programming 8 01-05-2006 03:19 PM
Data structures - Trees rahul_kulkarni Programming 1 05-16-2005 05:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration