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
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
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
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?
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
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?
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
LEARN ABOUT DEBIAN
htmake
HTMAKE(1) GLOBAL cgi Utilities HTMAKE(1)
NAME
htmake - create GLOBAL hypertext source searchable by gsearch.cgi
SYNOPSIS
htmake [htags options] [--url=base-url] [destdir]
DESCRIPTION
htmake is a wrapper script that creates searchable hypertext from program source code and records information into a path database needed
for a centralised search mechanism.
Prior to using this command you must have installed gsearch.cgi using the htconfig -I option and configured the location of the path data-
base in htmake.conf
Before you can create the hypertext source you need to execute gtags(1) from the root directory of the source tree. htmake is then called
from the same place.
htmake uses htags(1) to create the hypertext with a unique id and htconfig(1) to make the required entries in the path database.
OPTIONS
The following options will be passed to htags(1) if used.
-a Make an alphabetical function index.
-c Compress html. Use gzip(1) with .ghtml suffix.
-C Compress html. Use gzip(1) with .html.gz suffix.
-d tagdir, --tags=gtagsdbpath
Specifies the directory in which GTAGS and GRTAGS exist. The default is the current directory.
-F Use frames for definition index, file index and main view.
-l Make a name tag for each line of hypertext created.
-n Print out the line numbers.
-t title
The title of this hypertext. Defaults to the last component of the current path.
--action=cgi-url
Specify the location search queries are submitted to. Defaults to the value set in htmake.conf or to
http://localhost/cgi-bin/gsearch.cgi
The remaining options are more general or are passed to htconfig(1).
--url=base-url
the base url for your new hypertext source. For best results always use absolute url's here.
eg. http://host/~user/mysource
It defaults to file:/destdir
destdir
The directory in which hypertext is generated. The default is ./HTML
-v, --verbose
Activate the inbuilt screen saver. Give your phosphors a workout.
EXAMPLES
$ cd /usr/src/myprog
$ gtags
$ htmake
$ cd /usr/src/myprog
$ gtags -c
$ htmake -c --url=http://host/~user/prog/HTML
/home/user/public_html/prog
FILES
/etc/gtags/htmake.conf
path database
BUGS
As a wrapper htmake gets to inherit bugs from other software too. Isn't life fun.
This is alpha software - expect anything!
SEE ALSO
htconfig(1), htags(1), gtags(1), global(1).
AUTHOR
Ron Lee <ron@debian.org>
CREDITS
Thanks to Shigio Yamaguchi <shigio@gnu.org> for creating GLOBAL and releasing it as free software.
A truly cool productivity tool!
Debian GNU/Linux 27 March 1999 HTMAKE(1)