Sponsored Content
Top Forums Programming Programming Forum - Check it out! Post 302232998 by ovais245 on Friday 5th of September 2008 07:01:05 PM
Old 09-05-2008
"" 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.
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check lists for Unix Shell Programming

Hi all, Can anyone provide me any checklists or a list of steps I should follow before executing my scripts. Could also tell me if there are any other standards to be followed while shell programming like naming conventions for variables etc. Your help would be much appreciated. Regards,... (2 Replies)
Discussion started by: srikanth_ksv
2 Replies

2. Shell Programming and Scripting

Check any MQ is up or down using shell programming

Hi, I want to know that if there are any methods, which check the MQ, is up or down. Actually I have to write one job which checks the status of any one MQ is up or down. I don't know if there is any method of MQ, which tells the MQ, is up. Could u please give some link for the study... (1 Reply)
Discussion started by: rinku
1 Replies

3. UNIX for Dummies Questions & Answers

Carreer:Networking Programming in Unix (C programming Language)

Hello, I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies

4. What is on Your Mind?

Forum Update: Disabled Home Page Forum Statistics for Guests (Not Registered)

Just a quick update; to speed up the forums, I have disabled the forum statistics on the home page for non registered users. No changes for registered users. (0 Replies)
Discussion started by: Neo
0 Replies

5. Post Here to Contact Site Administrators and Moderators

Is it possible to add Python in the description of Shell Programming and Scripting of this forum?

https://www.unix.com/shell-programming-and-scripting/ The current description of Shell Programming and Scripting has: Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. Perl, php are there. Is it possible to add PYTHON there too? (3 Replies)
Discussion started by: cola
3 Replies

6. What is on Your Mind?

Mobile: Advanced Forum Statistics to Forum Home Page

For mobile users, I have just added a "first beta" Advanced Forum Statistics to the home page on mobile using CSS overflow:auto; so you can swipe if you need to see more. Google Search Console mobile usability says this page is "mobile friendly" so perhaps this will be useful for some of our... (12 Replies)
Discussion started by: Neo
12 Replies
UPSIMAGE.CGI(8) 						    NUT Manual							   UPSIMAGE.CGI(8)

NAME
upsimage.cgi - Image-generating helper for upsstats.cgi SYNOPSIS
upsimage.cgi Note As a CGI program, this should be invoked through your web server. If you run it from the command line, it will either complain about unauthorized access or spew a PNG at you. DESCRIPTION
upsimage.cgi generates the graphical bars that make up the right side of the page generated by upsstats.cgi(8). These represent the current battery charge, utility voltage, and UPS load where available. The images are in PNG format, and are created by linking to Boutell's excellent gd library. ACCESS CONTROL
upsstats will only talk to upsd(8) servers that have been defined in your hosts.conf(5). If it complains about "Access to that host is not authorized", check that file first. FILES
hosts.conf(5) SEE ALSO
upsd(8), upsstats.cgi(8) Internet resources: The gd home page: http://www.boutell.com/gd/ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ Network UPS Tools 05/22/2012 UPSIMAGE.CGI(8)
All times are GMT -4. The time now is 04:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy