GETPASS(3) BSD Library Functions Manual GETPASS(3)NAME
getpass -- get a password
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <pwd.h>
#include <unistd.h>
char *
getpass(const char *prompt);
DESCRIPTION
The getpass() function displays a prompt to, and reads in a password from, /dev/tty. If this file is not accessible, getpass() displays the
prompt on the standard error output and reads from the standard input.
The password may be up to _PASSWORD_LEN (currently 128) characters in length. Any additional characters and the terminating newline charac-
ter are discarded.
The getpass() function turns off character echoing while reading the password.
RETURN VALUES
The getpass() function returns a pointer to the null terminated password.
FILES
/dev/tty
SEE ALSO crypt(3), readpassphrase(3)HISTORY
A getpass() function appeared in Version 7 AT&T UNIX.
BUGS
The getpass() function leaves its result in an internal static object and returns a pointer to that object. Subsequent calls to getpass()
will modify the same object.
The calling process should zero the password as soon as possible to avoid leaving the cleartext password visible in the process's address
space.
Upon receipt of a SIGTSTP, the input buffer will be flushed, so any partially typed password must be retyped when the process continues.
BSD June 4, 1993 BSD
Check Out this Related Man Page
GETPASS(3) BSD Library Functions Manual GETPASS(3)NAME
getpass -- get a password
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <pwd.h>
#include <unistd.h>
char *
getpass(const char *prompt);
DESCRIPTION
The getpass() function displays a prompt to, and reads in a password from, /dev/tty. If this file is not accessible, getpass() displays the
prompt on the standard error output and reads from the standard input.
The password may be up to _PASSWORD_LEN (currently 128) characters in length. Any additional characters and the terminating newline charac-
ter are discarded.
The getpass() function turns off character echoing while reading the password.
RETURN VALUES
The getpass() function returns a pointer to the null terminated password.
FILES
/dev/tty
SEE ALSO crypt(3), readpassphrase(3)HISTORY
A getpass() function appeared in Version 7 AT&T UNIX.
BUGS
The getpass() function leaves its result in an internal static object and returns a pointer to that object. Subsequent calls to getpass()
will modify the same object.
The calling process should zero the password as soon as possible to avoid leaving the cleartext password visible in the process's address
space.
Upon receipt of a SIGTSTP, the input buffer will be flushed, so any partially typed password must be retyped when the process continues.
BSD June 4, 1993 BSD
hi all,
I am using HP-UX system.
I want echoing * characters while reading password through keyboard instead of blank space.
can u help me for that code?
Thanks (1 Reply)
I'm using rsync with the "-e ssh" option so of course it asks for a password using a prompt. Is there a way to tell a script to expect a prompt, wait for it, and give a password when it arrives?
There is a way to give rsync a password as part of its options using a file, but it only works with... (2 Replies)
Is there any way I can change the prompt which asks for the password on a UNIX system? e.g. When I login using Telnet instead of "Password" I should get "Correct Password".
Thanks,
Vineet (3 Replies)
Solaris...
I need to automate running of scsudo from another script. However, I've determined that scsudo reads the password from /dev/tty rather than STDIN when the Password prompt appears. I don't have 'expect' or equivalents available - can I automate sending the correct password when... (1 Reply)
Hi all,
I have a script that opens a xterm window and will prompt for a password.
My intention is, instead of waiting for a password it should get the password from a file.
How can I make this happen.?:confused:
Any help much appreciated. (1 Reply)
Hi Team,
I need password prompt between this script .i want to need put password manually. Instead of adding password in script .
Script pause till input password and resume again.
#!/usr/bin/expect
set ip
spawn telnet $ip
expect "login:"
send "USR\r"
expect "*assword*"... (3 Replies)