password mask in C


 
Thread Tools Search this Thread
Top Forums Programming password mask in C
# 1  
Old 06-17-2002
password mask in C

Hi,

Could any one help me to write a C program for password mask
with ******. I mean whatever word i will type that will show on the screen as ***** and should store the correct value in a variable.

Thanks in advance

Krishna
# 2  
Old 06-18-2002
Krishna

Check out the function getpass()...this function is used for getting the password without echoing on the terminal. It may not echo '*'s as you need.

Check out "man getpass".

Deepa
# 3  
Old 06-18-2002
getpass() will work fine, but I need password mask as "***"
# 4  
Old 06-18-2002
Did u try "ioctl"?
I havent tried so far..but feel that u can do it using this system call.
# 5  
Old 06-18-2002
I don't have idea about ioctl, if you know please send me the example code to : kkodava@maxis.com.my
# 6  
Old 06-18-2002
krishna, you are not a newcomer here, your post count is 40. This makes it even more disappointing when you break the rules. Please reread the forum rules. And notice rule number 10:
Quote:
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.
To solve your problem you will need to turn echo off. Then you will write a "*" for each character that you read. I do something very close to that in this post.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

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)
Discussion started by: Rich Marton
1 Replies

2. Shell Programming and Scripting

awk help to mask characters

Hi Guys, I'm not an expert so seeking advice on awk. I need to mask numbers in a text field so that they show up as "*" except for the last 4. Input: Desired Output: The part of the Code I am using gives me this Output num=$(echo $num | awk 'BEGIN{FS=OFS=""}{for (i=1 ; i<=NF-4; i++)... (4 Replies)
Discussion started by: aster007
4 Replies

3. Shell Programming and Scripting

Bash scripting mask password from ps

Hi All, I have a script, which prompts me for my password input, then it passes that password onto an argument for another script which is then passed onto an expect script which automates my logins to a bunch of servers to execute my commands. example. script A - request for password,... (7 Replies)
Discussion started by: aixkidbee
7 Replies

4. UNIX for Dummies Questions & Answers

What is mask and effective right mask in setfacl?

Hi Guys, can someone explain what is mask and effective right mask in setfacl and getfacl command with example, unable to get it. (3 Replies)
Discussion started by: Jcpratap
3 Replies

5. Red Hat

Samba create mask and dir mask on RHEL 4.8

Hi Experts, I'm using samba -3.6.1 on Red Hat Enterprise Linux ES release 4 (Nahant Update 8) ,all seems ok. The issue im facing is as follows. When ever a user creates a file via windows explorer the permissions assgined to the file are as follows -rw-rwxr--+ 1 tom group2 0 Mar 9... (1 Reply)
Discussion started by: maverick_here
1 Replies

6. UNIX for Dummies Questions & Answers

how to mask the password ?

Hi All, i am executing peoplesoft sqr command from unix prompt which has the unix id/password as parameter along with other parameters. i want to show whole command in log file but want to mask the id/password field. this command i am executing in shell script. Please suggest.. >sqr sqrname... (2 Replies)
Discussion started by: avi.coep
2 Replies

7. Shell Programming and Scripting

Need to Mask Data

I have an requirement. There is a file which has the below contents Unix|123|17-01-2010 .... .... .... .... and so an now each letter has a corresponding predefined mapping letter in order to mask the original data.(for example U = A, n=b, i=c, x=d, same like number 1=9,2=8,3=7. Also... (8 Replies)
Discussion started by: ksmbabu
8 Replies

8. Shell Programming and Scripting

mask ID number

HP-UX 11i v2. #!/bin/sh Hi all. I have a flat file like this with lines like this: |07/19/07|08:26AM|1|CupsCoffee|CupsCo|989898989 |Doe, John Y |THE PLUS CARD - Price| | |Y| | 2.00| I would like to replace the id number (field 6) with a masked... (3 Replies)
Discussion started by: lyoncc
3 Replies

9. IP Networking

Changing the mask

What is the command to change the mask to 255.255.255.0 The system was set up incorectly and the mask needs to be corrected (1 Reply)
Discussion started by: kkinnon
1 Replies

10. IP Networking

Subnet mask

Hi, I have about 30 computers for users with subnet mask x.x.x.0, and 25 computers for workers with s.m. x.x.x.128. My server has a s.m. x.x.x.128 so with workers computers I can see my server and all the computers in that s.m., but I can't see the server from the users computers and I need to see... (7 Replies)
Discussion started by: Z0DiaC
7 Replies
Login or Register to Ask a Question