login system using linux users

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geiregat Jonas

    login system using linux users

    I'm running a linux system I would like to create a login system based
    upon the users and passwd of my linux box how could I do this ?

  • Cameron

    #2
    Re: login system using linux users

    Geiregat Jonas wrote:[color=blue]
    > I'm running a linux system I would like to create a login system based
    > upon the users and passwd of my linux box how could I do this ?
    >[/color]

    Unless you are running it over SSL I wouldn't recommend that you do, and
    even then you should think twice and then choose not do it, create a
    user account for each of your users stored independantly from the box
    passwords.

    ~Cameron

    Comment

    • thumb_42@yahoo.com

      #3
      Re: login system using linux users

      Geiregat Jonas <eniac@sdf-eu.org> wrote:[color=blue]
      > I'm running a linux system I would like to create a login system based
      > upon the users and passwd of my linux box how could I do this ?[/color]

      In the "old days" that would be really easy, just lookup their userID in
      via the getpwent() and do a matching crypt() on the passwd entry.

      Modern systems however.. are a different matter, and it'll depend
      on your unique setup. (Many, but not all systems are PAM)

      I'd suggest looking at the source of 'sudo' or 'login' style programs to see
      how these programs do it *on your system*, on my redhat system, sudo uses
      PAM, so that'd probably be the place to start. (the other non-redhat systems
      I have access to don't have PAM or sudo installed, so I can't run a ldd on
      them to see)

      A "sledgehamm er" approach might be to look in /etc/shadow- for the entry,
      but that'd be kind of a brutal approach.

      This, of course, goes against good recommended practices.. but if you're
      really sure thats what you want.. at *least* make sure it's only enabled for
      certain users, (maybe users in a certain group for example) and try not to
      allow it for anything outside your intranet, take the usual sane
      precautions, etc.. etc..

      Using the conventional authentication mechanisms are almost always a better
      bet.

      Jamie

      Comment

      Working...