I am trying to do a while do loop that asks for a password and returns if the password entered is incorrect. I have that part working however i want to modify it so that if a similar word is entered it will read "that is close but incorrect" and i cannot seem to get it working, being new in the linux. my code is simple:
Any help will be greatly appreciated.
Thanks.
Moderator's Comments:
Please use code tags as required by forum rules!
Last edited by RudiC; 05-18-2016 at 12:04 PM..
Reason: Added code tags.
hi all,
i have written the following code:
while(proceed !='Y' && proceed!='N' && proceed!='y' && proceed!='n')
{
printf("\nPress \n\t 'Y' or 'y' to continue \n\t 'N' or 'n' to cancel:");
scanf("%c",&proceed);
}
the output i am gettin is:
Press
'Y' to continue
... (1 Reply)
Hi,
I have a directory called logs in which i have the log files.
i have to touch the file before deleting it.
i am doing like this
filestodelete="*.log* *log*"
for files in $filestodelete
do
touch $files $files.$(date +%a)
rm -f $filestodelete
done
touch is not working... (5 Replies)
Hi guys my while do loop is not working properly;
As soon as the load_date and run_date is same it should stop can somebody tell me where I am having the problem?
In an oracle table I have
LOAD_DT=5/1/2009 DATE datatype
RUN_DT=5/5/2009 DATE datatype
Now in a script with a spool file I get the... (15 Replies)
Hi Guys,
This is my code.. I am getting an error in the inside while statement when comparing.. I am not able to figure it out.. Pls help me...
while read value fatherid son_id top_id r_type
do
inside_value=1;
echo $inside_value;
echo $r_type;
while
do
echo... (6 Replies)
Hi
What is wrong with this loop
it was taken has a example in book!!!
it returns
then
/usr/sbin/svcadm disable ppserv
else /usr/sbin/ppadmin stop
fi
} (3 Replies)
hi
I had created a while loop in a script file called whiletest.sh as follows
as follows:
count=0
max=10
while
do
echo $count
echo count=$(count+1)" "
done
echo "value of count:$count"
then i run the script with the command
sh whilestest.sh
but its giving me an error... (5 Replies)
I have a while loop with -f and -o option.Can any one please tell me what that stands for?The Sample code is as follows:-
while
do
## some processing
done (10 Replies)
Hi Script Gurus,
I am facing issue with while loop in bash. The while loop is running as end less loop even after given criteria does not meet.
STATE_BEFORE_SPLIT () {
for clone in $Clonegroups; do
state=$( $Navicmd -listclone -name $clone -cloneid $Cloneid |awk... (3 Replies)
Hi,
I work on Ab-initio ETL tool which is based on Unix. I made a small script which has two loop's one with in another. All the functionality is working for the first line of outer loop but when it comes to other lines of outer loop it is throwing error as command not found. Below is the... (4 Replies)
Hi all,
a problem with a loop. Imagine it starts with
var1="$(cat txtif.out )"while
do
echo file1
echo file2
echo y > txtif.out
if
then
break
fi
done
exit 0
the problem is that if the file is changing during the loop seems to continue as it reads "x" state,... (5 Replies)
Discussion started by: Board27
5 Replies
LEARN ABOUT MOJAVE
passwd
PASSWD(1) BSD General Commands Manual PASSWD(1)NAME
passwd -- modify a user's password
SYNOPSIS
passwd [-i infosystem [-l location]] [-u authname] [user]
DESCRIPTION
The passwd utility changes the user's password. If the user is not the super-user, passwd first prompts for the current password and will
not continue unless the correct password is entered.
When entering the new password, the characters entered do not echo, in order to avoid the password being seen by a passer-by. The passwd
utility prompts for the new password twice in order to detect typing errors.
The new password should be at least six characters long and not purely alphabetic. Its total length should be less than _PASSWORD_LEN (cur-
rently 128 characters), although some directory systems allow longer passwords. Numbers, upper case letters, and meta characters are encour-
aged.
Once the password has been verified, passwd communicates the new password to the directory system.
-i infosystem
This option specifies where the password update should be applied. Under Mac OS X 10.5 and later, supported directory systems are:
PAM (default) Pluggable Authentication Modules.
opendirectory
A system conforming to Open Directory APIs and supporting updates (including LDAP, etc). If no -l option is specified, the
search node is used.
file The local flat-files (included for legacy configurations).
nis A remote NIS server containing the user's password.
-l location
This option causes the password to be updated in the given location of the chosen directory system.
for file,
location may be a file name (/etc/master.passwd is the default)
for nis,
location may be a NIS domainname
for opendirectory,
location may be a directory node name
for PAM,
location is not used
-u authname
This option specifies the user name to use when authenticating to the directory node.
user This optional argument specifies the user account whose password will be changed. This account's current password may be required,
even when run as the super-user, depending on the directory system.
FILES
/etc/master.passwd The user database
/etc/passwd A Version 7 format password file
/etc/passwd.XXXXXX Temporary copy of the password file
SEE ALSO chpass(1), login(1), dscl(1), passwd(5), pwd_mkdb(8), vipw(8)
Robert Morris and Ken Thompson, UNIX password security.
HISTORY
A passwd command appeared in Version 6 AT&T UNIX.
Mac OS X August 18, 2008 Mac OS X