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.
getpass() turns off character echoing while reading the password.
RETURN VALUES
getpass() returns a pointer to the null terminated password.
FILES
/dev/tty
SEE ALSO crypt(3)STANDARDS
The getpass() function appeared in Version 2 of the Single UNIX Specification (``SUSv2''), but it was already marked as legacy. The function
was removed in the IEEE Std 1003.1-2001 (``POSIX.1'') standard.
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.
SECURITY CONSIDERATIONS
The calling process should zero the password as soon as possible to avoid leaving the cleartext password visible in the process's address
space.
BSD May 6, 2010 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
I need to convert a password protected excel file which will be in UNIX server to a comma separated file. For this I need to open the excel file in UNIX box but the UNIX box doesn't prompt for password instead it is opened in an encrypted manner.
I could manually ftp the excel file to local... (2 Replies)
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)
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)