ASCII character to accept logon password


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ASCII character to accept logon password
# 1  
Old 02-02-2006
ASCII character to accept logon password

Hey all,

Just found your forum...Looks super rich with info! Can't wait to get through it all.

I am currently writing a web app in .net that telnets into a unix server (require uid + passwd), runs a command, and returns that output to be displayed on the web page.

I have gotten through the initial TelNet option negotiation and have hit the log on screen. Of course, I'm transferring bytes in my network stream so all my i/o is ascii.

I've been able to enter my username and am prompted for a password. I send an array of bytes, which is my passwd, but the unix box sits there. Finally, half a minute later, I receive the text:

/dev/pts/96: 3004-031 Password read timed out -- possible noise on port

I've tried using ascii 13, and 10 to attempt a carriage return, and I've even sent negotiation 'Go Ahead' command even though they're suppressed.

Does anyone know what my UNIX box is waiting for?
# 2  
Old 02-02-2006
Hi Gord,

Is it possible that your password contains any Unix control characters? I've had problems before with password that contan chrs such as #$^*! etc.

Cheers
Helen
# 3  
Old 02-02-2006
Thank you for the reply!!

This is just KILLING me lol.

No, i've even reset the unix passwd to ensure simplicity.

I'm guessing there has to be something that tells Unix to accept the passwd. Enter in the console sense, but to pass an ASCII enter (I think it's 13) after the password doesn't trigger it.

G
# 4  
Old 02-02-2006
Suppose my password was fred1. How would the system know my password was not fred12? Answer, because I press the return key after the password. How did you ever make it to the password prompt? You have to send a return after the user name as well. Again, my user name might be fred1 or fred12...
# 5  
Old 02-02-2006
You know what's weird? I didn't have to enter an ascii enter for the username.

Then I was stuck at the password. It would time out. Since then I've added an ascii carriage return but the login fails. Presumeably because the unix box is interpreting the ascii cr as a part of my password.

I don't know if simply sending a byte of cr is interpreted as a character by Unix or if it carries out cr's functionality.

This is so cool - but weird.
# 6  
Old 02-02-2006
Why not use a manual telnet client and observe what you have to do on the keyboard? That .net makes me think Windows. If so, open a cmd command line window and use the telnet command.
# 7  
Old 02-02-2006
Yeah - that's how I started.

When you open a telnet session you are prompted for username. You enter that, you hit enter. Then you are prompted for password. You enter that then you hit enter.

But this doesn't help, as I haven't hit enter after my username, and the UNIX box will prompt me for the password.

This suggests that there's something in the stream writing that hits a carriage return for you.

However, the stream writer won't work the same way for the password.

Now I am forced to look at what UNIX is reading in and all the invisible functionality that I can't see.

G
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to accept command line argument as character or text if number is entered?

Hello Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Discussion started by: aadityapatel198
6 Replies

2. UNIX for Dummies Questions & Answers

What is ASCII character?

Hi Guru, I have put one post yesterday and get answer. thanks for your help. my question today is: what is ascii character for following non printable characters: ( we need filter these characters out in another process) ^MM-^E^MM-^E. Old post link: ... (5 Replies)
Discussion started by: ken002
5 Replies

3. Shell Programming and Scripting

Logon to multiple hosts using ssh hardcode password

Hi im trying to write a script to logon to list of servers with same userID. I have no option/plan to implement ssh-keygen sharing between the systems, so i have written script creating 2 files, file1 holds list of hosts host1 host2 host3 file2 has following script for i in `cat file1`... (1 Reply)
Discussion started by: dreamaix
1 Replies

4. Shell Programming and Scripting

Print the next ASCII character

Hi, In my file, for few field I have to print the next ASCII character for every character. In the below file, I have to do for the 2,3 and 5th fields. Input File ======== 1|abc|def|5|ghi 2|jkl|mno|6|pqr Expected Ouput file ======= 1|bcd|efg|5|hij 2|klm|nop|6|qrs (2 Replies)
Discussion started by: machomaddy
2 Replies

5. Shell Programming and Scripting

FTP Issue with Non ascii character

I have one file .dat file on windows server containg the following text "Bürki" Now When I am using FTP (get) command from UNIX server the text is appering is as "Bürki" I want to preserve the text in the file on UNIX server as it is in source file. Could you please suggest some... (2 Replies)
Discussion started by: Bhushan D
2 Replies

6. Shell Programming and Scripting

Bash script to accept password and replace characters with * as they are typed

I googled this and couldn't find an answer, so I rolled my own. Here it is, hope it helps. Feel free to improve on it. #!/bin/bash PWORD= ANYKEY=0 echo -n "Password: " until do read -N 1 -s ANYKEY echo -n "*" PWORD="$PWORD$ANYKEY" done echo echo $PWORD exit (3 Replies)
Discussion started by: krisdames
3 Replies

7. UNIX for Advanced & Expert Users

ASCII Character Set

I thought I would point this out. This has a lot of the non printing characters. ASCII Character Set (7 Replies)
Discussion started by: cokedude
7 Replies

8. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

9. UNIX for Dummies Questions & Answers

Ascii value of character?

Is there a way to determine the ascii value of a character? For example, let's say a shell variable has the value 'A'. I would like it's ascii value (e.g. 65 in this case). I would like to do this from a script (preferably ksh). (12 Replies)
Discussion started by: sszd
12 Replies

10. Shell Programming and Scripting

How to script to logon servers using id and password

Hey.. I am new in scripting.. I know a little bit of scripting.. I am facing some problem.. I need to create a script using which I may log on to a server (e.g. ftp) with ID and password.. thus copy a particular file to a local dir.. the commands required to do that I do know.. I am able to do it... (1 Reply)
Discussion started by: razeeev
1 Replies
Login or Register to Ask a Question