HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /dev/tty and getpass()
Operating System - HP-UX
1833876
Members
1683
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 03:58 PM
07-07-2004 03:58 PM
/dev/tty and getpass()
Hi
I have a C program that calls getpass() on a HP-UX 11.0 system. However getpass fails because it has a problem reading /dev/tty. However my permissions on /dev/tty are as follows:
crw-rw-rw- 1 bin bin 207 0x000000 Jul 1 13:28 /dev/tty
The program works on another HP-UX 11 box with the same permissions as the above.
Any help would be much appreciated ?
Thanks in advance
JUP
I have a C program that calls getpass() on a HP-UX 11.0 system. However getpass fails because it has a problem reading /dev/tty. However my permissions on /dev/tty are as follows:
crw-rw-rw- 1 bin bin 207 0x000000 Jul 1 13:28 /dev/tty
The program works on another HP-UX 11 box with the same permissions as the above.
Any help would be much appreciated ?
Thanks in advance
JUP
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 05:05 PM
07-07-2004 05:05 PM
Re: /dev/tty and getpass()
Hai,
Did you try it with a simple program to check the getpass() call.
I have tried it on 11.23 as,
/* test.c */
#include
main() {
const char *prompt="/dev/tty";
if ( getpass(prompt) == NULL ) {
printf ("Error in reading problem\n");
exit (1);
}
exit (0);
}
It is prompting for /dev/tty. But there is needed to stop the program.
Use debugger and Check this on both machines.
Regards,
Muthukumar.
Did you try it with a simple program to check the getpass() call.
I have tried it on 11.23 as,
/* test.c */
#include
main() {
const char *prompt="/dev/tty";
if ( getpass(prompt) == NULL ) {
printf ("Error in reading problem\n");
exit (1);
}
exit (0);
}
It is prompting for /dev/tty. But there is
Use debugger and Check this on both machines.
Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 06:05 PM
07-07-2004 06:05 PM
Re: /dev/tty and getpass()
The getpass(0 routine fails. My guess is that /dev/tty has failed to open.
How can I test ?
How can I test ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 07:56 PM
07-07-2004 07:56 PM
Re: /dev/tty and getpass()
Hello,
Dealing with the tty is getpass job, I think you don't even need to identify the tty or even mention it.
char *temp;
temp = (char *)getpass ("Password: ");
How do you use getpass and what is the exact error message ?
Nicolas
Dealing with the tty is getpass job, I think you don't even need to identify the tty or even mention it.
char *temp;
temp = (char *)getpass ("Password: ");
How do you use getpass and what is the exact error message ?
Nicolas
All different, all Unix
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP