For an assignment i have to create a CSH menu that requires a password in order to login, and then does all this other stuff.
I am really stumped on the password part though here is the question
1) ask for a password from the user.
If the password is not correct, the system will exit
with an appropriate error message.
The program password file must be called "PASSWORD" in the current directory. The password will be in this file as a single newline-terminated word. For testing purposes, I will assume that this file will be part of your tgz submission. It also only requires the first 32 characters for varification.
Originally i had
then a simple IF statement
The problem is, i have no idea how to read from the PASSWORD file that we have to create.
I dont expect an answer to this specific problem, as i would much rather make it on my own, but any help regarding how to take text from a file to validate, and also how to just take the first 32 characters would be wonderful..
Cheers
---------- Post updated at 04:23 AM ---------- Previous update was at 04:10 AM ----------
Update:
I am now able to read from the file using this
only problem is, my cutting of the first 32 characters doesnt work...
I do have a problem with updating the password though.
my code (within a case statement):
I keep getting an error though
if i enter new password as "hello"
i get "hello: command not found."
I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login.
Following the provided link I attempted to update my password to one of my own... (1 Reply)
hi,
From the below script:
##########################################pwd_auth.sh########################################################################################
#Author: Pandeeswaran Bhoopathy
#Written on:26th Jan 2012 2:00PM
#This script describes the feature of stty and illustrates... (3 Replies)
Hi
We send *.csv with sensitive data to our customers. Our customers open those files with Excel.
A new requirement is that we password protect those CSV files.
I thought to pack them with ZIP and assign a password to the archive.
But Solaris 10 can't encrypt ZIP files.
$ zip -P... (12 Replies)
hi all,
I am using HP-UX system.
I want echoing * characters while reading password through keyboard instead of blank space.
can u help me for that code?
Thanks (1 Reply)
Hi Friends.
I am new to scripting now i want to change the root password using the script with standard password.
which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Helo ,
I m using linux pam library for user and its password authentication.
I m creating new user and giving its password.I m giving password of 10 characters.now when I login in as that newly created user its ask me
$ su - ram
Password:
You are required to change your password immediately... (12 Replies)
Hi,
First of all i am using solaris 10. I want to write a script that ask user to enter password and read the character input from keyboard. The ask to re-enter the password and then if they are match it will accept.
But my problem is I want to echo a '*' character instead of the character I... (4 Replies)
hi
iam reading data from web page using request socket and curl socket.
now my problem is some the web page containg data as a image so how can i read the data from a image.
thank,inadvance.
sree (3 Replies)
How do I Authenticate users with a Password file that I have build using PWP - Password Privacy
Password file contents are as under
bash-2.03$ cat passwd.cf
janes hostname Q+BejYC7AxGVv21TiAiUYQ== user janes /tmp/pwp_access.cf
Now two things I need from a script
If the... (2 Replies)