UNIX: How to determine the authentication domain of a user ?

This is a discussion on UNIX: How to determine the authentication domain of a user ? within the Linux Security forums, part of the System Security and Security Related category; Hi, Suppose if there are two user accounts with the same name (vprabhu on local (i.e. files) as well ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-07-2008
vasantha.prabhu
 
Posts: n/a
Default UNIX: How to determine the authentication domain of a user ?

Hi,

Suppose if there are two user accounts with the same name (vprabhu on
local (i.e. files) as well as NIS), then /etc/nsswitch.conf determines
which domain to authenticate against. However, depending on the OS
(for example authconfig settings in linux) can alter the nsswitch.conf
procedure.

For example,

cat /etc/nsswitch.conf|grep passwd
passwd: nis files

then if vprabhu logs in it will be authenticated against NIS. However,
if authconfig settings are "Local authorization is sufficient" is ON,
it will authenticate against FILES.

Now, given this situation, how do we reliably know against which
domain (local/NIS) a user has authenticated against while logging in ?
If there is a POSIX API or portable API or even OS commands across
major UNIX versions please let us know.

Thanks,

Gaurab
Reply With Quote
  #2 (permalink)  
Old 02-08-2008
C.
 
Posts: n/a
Default Re: UNIX: How to determine the authentication domain of a user ?

On 7 Feb, 03:22, "vasantha.prabhu" <gaurab.p...@gmail.com> wrote:
> Hi,
>
> Suppose if there are two user accounts with the same name (vprabhu on
> local (i.e. files) as well as NIS), then /etc/nsswitch.conf determines
> which domain to authenticate against. However, depending on the OS
> (for example authconfig settings in linux) can alter the nsswitch.conf
> procedure.
>
> For example,
>
> cat /etc/nsswitch.conf|grep passwd
> passwd: nis files
>
> then if vprabhu logs in it will be authenticated against NIS. However,
> if authconfig settings are "Local authorization is sufficient" is ON,
> it will authenticate against FILES.
>
> Now, given this situation, how do we reliably know against which
> domain (local/NIS) a user has authenticated against while logging in ?
> If there is a POSIX API or portable API or even OS commands across
> major UNIX versions please let us know.
>
> Thanks,
>
> Gaurab


You don't. You'd need to rewrite the pam modules in your chain to set
a flag somewhere but its an ugly way to solve a silly problem

C.
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:29 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0