Toon posts:

[PAM] Alleen bepaalde users in laten loggen

Pagina: 1
Acties:

Verwijderd

Topicstarter
Weet iemand hoe je ervoor kunt zorgen dat alleen bepaalde mensen kunnen inloggen op een PC? Bijvoorbeeld alleen user piet?

Andere user accounts zijn vaak wel benodigd voor FTP, Mail en op sommige andere pc's mogen ze misschien bijvoorbeeld weer wel inloggen (users komen uit LDAP). Maar ik wil weer niet dat ze op deze bepaalde PC inloggen.

Ik weet dat dit zou kunnen met bijvoorbeeld ssh_allow in sshd_config. Maar ik doe het graag op een wat lager niveau. Dan weet ik zeker dat ze ook fysiek op de terminal niet in kunnen loggen.

  • AtleX
  • Registratie: Maart 2003
  • Niet online

AtleX

Tyrannosaurus Lex 🦖

Users krijgen bij mij standaard de shell /bin/false. Dan kan er niet via SSH oid worden ingelogd maar wel via FTP, etc. Als een user wel access nodig heeft kan ik dat heele envoudig aanpassen in /etc/passwd :)

Mini howto:

-Voeg aan /etc/shells de regel /bin/false toe.
-Verander in /etc/adduser.conf de regel DSHELL=/bin/bash in DSHELL=/bin/false

Dan kunnen users niet meer via de console of SSH inloggen.

Dit werkt bij Debian :)

[edit]
en atlex hij vraagt om een pam oplossing :P
Dat is waar ja :P
[/edit]

[ Voor 53% gewijzigd door AtleX op 06-12-2004 10:20 ]

Sole survivor of the Chicxulub asteroid impact.


  • Blaasvis
  • Registratie: November 2001
  • Laatst online: 11-02 07:27

Blaasvis

Cidora \o/

http://www.comptechdoc.or...nuxworks/linux_hlpam.html

Deze link geeft goed weer hoe wat je zou moeten doen ;) kijk vooral eens naar het stukje over pam_listfile.
en atlex hij vraagt om een pam oplossing :P

Freedom is everything you need ; <moto-moi|afk> ik verkloot het gewoon nooit :P


  • MrBarBarian
  • Registratie: Oktober 2003
  • Laatst online: 07-03-2023
Nou, PAM = pluggable Authentication Modules.. Authenticatie dus.. en de vraag die hij stelt is een authorizatie kwestie... Opzich vraag ik me dus ook sterk af of je hiervoor PAM moet gebruiken.

iRacing Profiel


Verwijderd

/etc/security/access.conf is de PAM versie van hetgeen je naar op zoek bent ;)

Verwijderd

Topicstarter
Verwijderd schreef op maandag 06 december 2004 @ 14:37:
/etc/security/access.conf is de PAM versie van hetgeen je naar op zoek bent ;)
Jaaaa! dat is precies wat ik zocht :D, bedankt.

Verwijderd

Topicstarter
MrBarBarian schreef op maandag 06 december 2004 @ 10:22:
Nou, PAM = pluggable Authentication Modules.. Authenticatie dus.. en de vraag die hij stelt is een authorizatie kwestie... Opzich vraag ik me dus ook sterk af of je hiervoor PAM moet gebruiken.
Dit vind ik opzich wel een interessante discussie. Standaard zit er in Linux niet een autorisatie mechanisme om te bepalen wie wel en niet mag inloggen. Natuurlijk is er wel een systeem om te bepalen wie waar welke files etc mag schrijven.

Ik denk dat PAM toch wel de plek is om dit soort dingen te doen, met betrekking tot wie wel en niet mag inloggen. Simpel weg omdat je het nergens anders systemwide kan opgeven.

  • Onno
  • Registratie: Juni 1999
  • Niet online
MrBarBarian schreef op maandag 06 december 2004 @ 10:22:
Nou, PAM = pluggable Authentication Modules.. Authenticatie dus.. en de vraag die hij stelt is een authorizatie kwestie... Opzich vraag ik me dus ook sterk af of je hiervoor PAM moet gebruiken.
Dat er authenticatie in de naam staat betekent niet meteen dat dat ook het enige doel is.
Linux-PAM deals with four separate types of (management) task. These
are: authentication management; account management; session
management; and password management.

[...]

The four types are as follows:

o auth; this module type provides two aspects of authenticating
the user. Firstly, it establishes that the user is who they
claim to be, by instructing the application to prompt the
user for a password or other means of identification.
Secondly, the module can grant group membership
(independently of the /etc/groups file discussed above) or
other privileges through its credential granting properties.

o account; this module performs non-authentication based
account management. It is typically used to restrict/permit
access to a service based on the time of day, currently
available system resources (maximum number of users) or
perhaps the location of the applicant user---`root' login
only on the console.

o session; primarily, this module is associated with doing
things that need to be done for the user before/after they
can be given service. Such things include the logging of
information concerning the opening/closing of some data
exchange with a user, mounting directories, etc. .

o password; this last module type is required for updating the
authentication token associated with the user. Typically,
there is one module for each `challenge/response' based
authentication (auth) module-type.
Wat hij wil is een 'account' ding (alhoewel het ook in auth te proppen is zoals mod_listfile doet; het ligt er maar aan of je zo'n listfile als een authenticatie(filter) ziet of niet) en daar is PAM dus prima geschikt voor.

[ Voor 4% gewijzigd door Onno op 07-12-2004 01:16 ]

Pagina: 1