I'm new to C++.
I have a text file named idpw.txt which is storing id and password
e.g
admin password
account1 abc
john hello
Here's my code so far:
I can login successfully, but here's the problem.
I want to do it in a sense that:
1) When username is correct, but password is wrong, error message will be : "Wrong Password"
2) When username is not in the list, error message will be : "No such user exist"
3) If a user typed in wrong password for 3 times, account will be locked.
Am I doing the login function right? The for loop for int j seems really wrong.
Is there a way to do this?
to lock an account, you'd probably have to append the file to which accounts were locked ... or add "locked" after the "username password" in the text file.
You can loop through the whole thing 3 times and lock through it at the end if that's the case
Where would you put the loop if the user enters 3 times wrong username or password, how will it display again "Please enter your username" etc.
Where will the loop be?
Sorry I am new and confused...
Doesnt have to lock the account , just exit from the application.
Hi,
Am writing a script where I want to find uptime of certain servers. Is there any command where we can find uptime without login to the server, since the server list is big logging to the server will time consuming.
Thanks in advance (7 Replies)
Guy's
I have AIX 6.1 has some slowness when I login to the system ..
When I login by user screen hangs for some time 20 seconds then it's give me the command prompt .. !
system is fine is working fine only this issue I faced can you please help me in this .. what's the expected reason... (2 Replies)
What is the command to list all UNIX system login accounts?
What is the command to list all system password parameters for UNIX(minimum length, complexity,age, invalid lockout attempts, expiration date , user inactivity lockout) (1 Reply)
Hi,
I was add my shell script in /etc/rc.d/rc.local file
Eg.
sh /root/KernelModule.sh
my KernelModule.sh contain
insmod xxxxx.ko
insmod yyyy.ko
I have insmod 22 kernelmodule in this script , all the modules are my own driver modules.
now problem is my system is booting but... (2 Replies)
Hi,
I want to code a script with perl. For this, I need some knowledge.
How can i use system user name(with group) and password in my login page?
I will be happy if you can help me (2 Replies)
hi, i have got a
SUN F15K DOMAIN TAKING HARDWARE CONFIGURATION DUMP. DUMP FILE: -D/VA message
i wnat to logon as sms-svc on to the controller to check what's happening
can you please guide me how do i login as sms-svc on the controller and check
thank you (1 Reply)
Hello,
I'm new to HP-UX. I have a system running B.11.23 on ia64. The system gets its user passwords via active directory. Everytime a new account is added to AD a script pushes out the account info to all the systems and this system is updated too. However, on this machine, users are unable to... (2 Replies)
Hy everyone!
I'm trying to lock out system accounts on my Tru64 UNIX machines.
Wherever I look, it says only to put Nologin or *Nologin in password field of desired account in /etc/passwd.
But it doesn't work. I still can su to that accounts. There are some accounts that already have Nologin... (1 Reply)
Hi,
I'm new to solaris/ Unix and would like to know how to check in the system what
was the last login user were doing. Is there any way to check this? Thanks in advanced. (1 Reply)