uid (user authentication)

From: Janina Kramer (j.kramer_at_school-sucks.com)
Date: 07/26/04

  • Next message: rockwell: "Re: encrypt and decrypt using encrypt(char block[64], int edflag)"
    Date: Mon, 26 Jul 2004 00:30:09 +0200
    
    

    hi ng,

    i want to read a username and a password, verify it and change the uid
    of the current process to the corresponding user. changing the uid by
    using setuid(..) isn't the problem (though by the way: would it be
    better to change the uid or the effective uid? - or doesn't that matter
    at all, because i will let the process terminate itself just after
    performing it's task, anyways?), but how can i get the uid of that
    specific user and verify the password? (i want to use just the same
    users that can be used at system login or for ssh and so on.)

    thanks in advance
    janina

    p.s.: language is C, of course


  • Next message: rockwell: "Re: encrypt and decrypt using encrypt(char block[64], int edflag)"

    Relevant Pages

    • Re: uid (user authentication)
      ... > i want to read a username and a password, verify it and change the uid ... you compare the result to the encrypted password. ... PAM. ...
      (comp.unix.programmer)
    • Re: Checking to see if PID is running
      ... ##> Is there a preferred module, under Linux, to verify whether a given ... Nothing looked promising via a ... Well, you can find out something in some cases, but you cannot use kill ... UID 0, and doesn't have the same UID as the process the signal is send to. ...
      (comp.lang.perl.misc)
    • Re: uid (user authentication)
      ... changing the uid ... > Next thing is to verify the password. ... > you got from getpwnamor getspnam() as the 'salt' argument. ... > you compare the result to the encrypted password. ...
      (comp.unix.programmer)
    • uid (user authentication)
      ... i want to read a username and a password, verify it and change the uid ... language is C, of course ...
      (comp.unix.programmer)
    • Re: uid (user authentication)
      ... >i want to read a username and a password, verify it and change the uid ... Can't comment on the setuid/seteuid difference, but as for username ... tokens, I think the best use of your time would be to learn about ...
      (comp.os.linux.development.apps)