473,804 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Password change in C++

Hi guys. I am new member in this group. I am also new to Visual C++. I
am developing a new system. I have a password to enter the system. The
user should have a choice to change his/her password anytime. The
password should be 8 char ending with an #. Could someone help me &
show how it is done.

Jul 23 '05 #1
2 3034
ben
> Hi guys. I am new member in this group. I am also new to Visual C++. I
am developing a new system. I have a password to enter the system. The
user should have a choice to change his/her password anytime. The
password should be 8 char ending with an #. Could someone help me &
show how it is done.


For the whole thing, no. What a small and trivial part, yes. Which part?
Jul 23 '05 #2

"Sigi" <kk*******@yaho o.co.uk> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Hi guys. I am new member in this group. I am also new to Visual C++. I
am developing a new system. I have a password to enter the system. The
user should have a choice to change his/her password anytime. The
password should be 8 char ending with an #. Could someone help me &
show how it is done.


What part do you need help with? What do you have so far?

Sounds like a homework assignment. I find it difficult to believe you're
developing an entire "system", but don't know how to have the user enter a
string. If it's not homework, then why make the password exactly 8
characters, and why add the # at the end? Those rules seem arbitrary, and
make the password less secure than a variable-length password.

Break the task into parts. First write a function that lets a user enter a
string. (Preferably, use std::string, unless you're required to use char
arrays for this.)

Then write another function that calls the first function, checks that it's
8 characters long plus the # at the end. If it doesn't meet those
requirements, have this second function loop, calling that first function
until the user gets it right. (You could provide some kind of special
keyword the user could enter that would cancel the operation, if desired.)

Finally, you'll need to write the "system" which allows the user to specify
that they *want* to change their password, including some way to store that
password (and I would assume some way to "log on" to the system in the first
place). But if this is homework as I suspect, you won't be writing that
part.

By the way, if you're wondering how to do like most password systems, and
show # or * characters instead of the characters the user is typing while
entering the password, you'll need to step outside standard C++ and use some
platform-specific features, since C++ doesn't provide facilities for that
kind of keyboard handling.

-Howard
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
14524
by: arktikturtle | last post by:
Hi! I'm looking for a way to validate a password within PL/SQL. I want to write CREATE PROCEDURE change_password(old_password IN VARCHAR2) IS BEGIN -- check if old_password is correct... but how? I can get the hashed value of the password from DBA_USERS, of course, but is there a way to hash old_password to see if it matches? (I wouldn't be
1
4292
by: Mindy Geac | last post by:
Hello, I'm seaching for the possibility to change Domain/User passwords. And a check for users if the password has to change with the first logon or when the password is expired. thanx, Mindy
2
2421
by: MLH | last post by:
What's the simplest way to allow a user of an A97 app to change password?
10
9894
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
2
5475
by: Drew Pawlik | last post by:
I am needing to write an application that will be used every month to automatically run queries on an Oracle database. But the password I need to log in to the database needs to be changed every month. Is there any way to change the password through the connection string, or through any other C# code so I do not have to change it manually every month (since the app is automated)? -- If you can't beat them, arrange to have them...
5
16941
by: scorpion53061 | last post by:
is it possible to set the database password that you can set in access for a database from a vb.net application?
0
3684
by: GregS | last post by:
We have a client that has a very large number of users that will be connecting back to the domain via VPN only. The problem is that the communications vendor can not pass the password expiration notice back to the client. What we would like to do is run a script or application after the vpn tunnel is established that checks the number of days remaining before the password expires and then give the user a prompt to change their password when a...
2
4505
by: J | last post by:
Hello. I apologize if this isn't the appropriate group for this question but I was wondering if it's possible to allow regular windows domain users to change their passwords through an .asp page? I'm trying to figure out the best way to handle domain users to log into an .asp application tied with SQL Server 2000 on the back end since I keep reading that windows authentication is better practice to log into SQL Server. Thanks in...
1
2328
by: eighthman11 | last post by:
Hi everyone: I created a custom toolbar called Password, so users can change their password. I used the Command "User and Group Accounts". I know the user can not change anything in the Tab "Users" or "Groups" in the "User and Group Accounts" and can only use the tab "Change Logon Password", but can I force a tab selection to the tab "Change Logon Password" and disable the other two tabs? Or does anyone know of an alternative way to...
2
5079
by: bemytthm | last post by:
I just want to ask abt communicate with AD using ASP.net. I would want to ask you all to help me correct a problem like this: This is a code i use to change password on AD public bool ChangePasswordAD(string strLogin, string strOldPasswd, string strNewPasswd) { try { string domainAndUsername = "aloha.com" + @"\" + strLogin; DirectoryEntry entry = new...
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.