Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ASCII character to accept logon password Post 97788 by Bab00shka on Thursday 2nd of February 2006 12:14:40 PM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
GETPWENT(3)						     Library Functions Manual						       GETPWENT(3)

NAME
getpwent, getpwnam, getpwuid, setpassent, setpwfile, setpwent, endpwent - get password file entries SYNOPSIS
#include <sys/types.h> #include <pwd.h> struct passwd *getpwent() struct passwd *getpwnam(login) char *login; struct passwd *getpwuid(uid) uid_t uid; int setpassent(stayopen) int stayopen; void setpwfile(file) char *file; int setpwent() void endpwent() DESCRIPTION
Getpwent, getpwuid, and getpwnam each return a pointer to a structure containing the broken-out fields of a line in the password file. This structure is defined by the include file <pwd.h>, and contains the following fields: struct passwd { char *pw_name; /* user name */ char *pw_passwd; /* encrypted password */ uid_t pw_uid; /* user uid */ gid_t pw_gid; /* user gid */ time_t pw_change; /* password change time */ char *pw_class; /* user access class */ char *pw_gecos; /* Honeywell login info */ char *pw_dir; /* home directory */ char *pw_shell; /* default shell */ time_t pw_expire; /* account expiration */ }; These fields are more completely described in passwd(5). Getpwnam and getpwuid search the password database for a matching user name or user uid, respectively, returning the first one encountered. Identical user names or user uids may result in undefined behavior. Getpwent sequentially reads the password database and is intended for programs that wish to step through the complete list of users. All three routines will open the password file for reading, if necessary. Setpwfile changes the default password file to file, thus allowing the use of alternate password files. Setpassent opens the file or rewinds it if it is already open. If stayopen is non-zero, file descriptors are left open, significantly speeding up subsequent calls. This functionality is unnecessary for getpwent as it doesn't close its file descriptors by default. It should also be noted that it is dangerous for long-running programs to use this functionality as the password file may be updated by chpass(1), passwd(1), or vipw(8). Setpwent is identical to setpassent with an argument of zero. Endpwent closes any open files. These routines have been written to ``shadow'' the password file, e.g. allow only certain programs to have access to the encrypted pass- word. This is done by using the mkpasswd(8) program, which creates ndbm(3) databases that correspond to the password file, with the single exception that, rather than storing the encrypted password in the database, it stores the offset in the password file where the encrypted password may be found. Getpwent, getpwnam, and getpwuid will use the ndbm files in preference to the ``real'' password files, only reading the password file itself, to obtain the encrypted password, if the process is running with an effective user id equivalent to super-user. If the password file itself is protected, and the ndbm files are not, this makes the password available only to programs running with super-user privileges. FILES
/etc/passwd SEE ALSO
getlogin(3), getgrent(3), ndbm(3), passwd(5) DIAGNOSTICS
The routines getpwent, getpwnam, and getpwuid, return a null pointer on EOF or error. Setpassent and setpwent return 0 on failure and 1 on success. Endpwent and setpwfile have no return value. BUGS
All information is contained in a static buffer which is overwritten by each new call. It must be copied elsewhere to be retained. Intermixing calls to getpwent with calls to getpwnam or getpwuid, or intermixing calls to getpwnam and getpwuid, after using setpassent to require that file descriptors be left open, may result in undefined behavior. The routines getpwent, endpwent, setpassent, and setpwent are fairly useless in a networked environment and should be avoided, if possible. 7th Edition February 23, 1989 GETPWENT(3)
All times are GMT -4. The time now is 03:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy