Re: AUTHENTICATION IN UNIX



sethukr@xxxxxxxxx writes:

Hi all,

I have implemented a sample FTP Server.

But it allows any user.

I need to implement a "Authendication Module" in my FTP Server( in
C lang).

Help me by giving ur suggestions. How can i authenticate a valid
user?????????????

The first question to answer, is what authentication database you want
to use.

For example, you could keep a list of user/password specific to your
ftp server, or you could use /etc/passwd, or you could use NIS or PAM
or LDAP, etc).


The second question is how the authentication protocol works. The
standard FTP just sends the user name and the password in clear to the
server, but this allow anybody with access to the network to listen
and collect the password. In some protocols, for example POP-3,
instead of sending the password in clear, we can send a md5 hash of
the user name + password + a token send by the server.

In any case, the server just needs to be able to find a password given
a user name, and then to do the processing it needs to do to authenticate.

If you keep your user/password in a simple file (or a db file), you
can just compare a password sent in clear with the password found in
the database.

If you want to use /etc/passwd(/etc/shadow), you need to encrypt the
password send it clear with the same salt as in
/etc/passwd(/etc/shadow), and compare the encrypted versions.



--
__Pascal Bourguignon__ http://www.informatimago.com/

HEALTH WARNING: Care should be taken when lifting this product,
since its mass, and thus its weight, is dependent on its velocity
relative to the user.
.



Relevant Pages

  • RE: Which ftp?
    ... >I am considering an FTP server that will authenticate via AD, Radius, or ... >LDAP. ... I've narrowed it down to PureFTP ...
    (RedHat)
  • Re: Authentication issue
    ... The IIS FTP server is a member server right? ... > local user then gave the user rights on the ftproot and then gave the ... >> You mean the user can't authenticate with local user? ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Authentication issue
    ... You mean the user can't authenticate with local user? ... You can't prevent domain auth as this machine is part of the domain. ... However, the auth will always try local user database, unless it is ... >I have setup an FTP server in IIS v6 in windows 2003. ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Authentication in Unix
    ... source code that does this, ... I need to implement a "Authendication Module" in my FTP Server(in ... for applications that authenticate users. ...
    (comp.unix.programmer)
  • Question:how can I config vxworks target ftp server?
    ... I can log in the target ftp server with any user/password after I ... included the ftp server component from tornado, ...
    (comp.os.vxworks)