Programming Forum - Check it out!

To anyone who is really into programming, and not so much just unix/linux, you may want to check out the following site:

http://www.cprogramming.com/cgi-bin/cboard/index.php

It is a new forum with the same format as this one. It actually nearly looks the same.

Thanks for the link!!

Hey how do I create a UNIX utility which in C?

If answer, reply.

Hey guyz,

I cannot access the posted link ! :confused:

it's nearly 7 years old... so maybe it's offline :wink:

Yes, they changed the software and moved the url of the board.

C Board - Powered by vBulletin

"" need this code in C language for UNIX"
Write or study a small program that mimics the most common login procedures in UNIX.
You have two options here. Either, you write it yourself according to the specification
below, or you copy the file
/cab/cestud/work/edu/course/EDA263_Computer_Security/
lib/login_linux/login_linux.c into your home directory. If you choose to write
it yourself the following should be implemented.

  • The program begins with displaying �login:� and takes the username as input.

  • Then the program writes �Password:� and waits for the password to be entered,
    which should not be visible on the terminal (use the function getpass(3) that
    among other things will see to that the text is not �echoed� on the terminal).

  • The program queries the system�s user database to see if the username exists. If
    this is the case it encrypts the entered password (with a known algorithm) and
    ensures it corresponds to the stored encrypted password belonging to the actual
    user. Suitable library routines are getpwnam(3), crypt(3) and strncmp(3).

  • If the username does not exist, or if the password is wrong, the program displays
    �Login incorrect� and restarts from the beginning, otherwise it writes something
    like �Welcome to this System!� and terminates.
    Test that your program works by compiling and running it.