- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ttytype: couldn't open /dev/tty for reading
Categories
Company
Local Language
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
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО06-19-2007 02:31 AM
тАО06-19-2007 02:31 AM
I get the error message "ttytype: couldn't open /dev/tty for reading" only when I run su - username -c "command".
I don't think it has to do with the profile because I get the error before it even starts the profile (I put set -x in the .profile). I can run it from the command line without a problem as well. It is only from cron. Any ideas?
Thanks!
Solved! Go to Solution.
- Tags:
- tty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2007 02:48 AM
тАО06-19-2007 02:48 AM
Solutionyou need to take a look at /etc/profile, as this runs before .profile and contains the ttytype command.
you need to stop that section from executing for "non-interactive" logins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2007 02:50 AM
тАО06-19-2007 02:50 AM
Re: ttytype: couldn't open /dev/tty for reading
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1047318
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2007 02:51 AM
тАО06-19-2007 02:51 AM
Re: ttytype: couldn't open /dev/tty for reading
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2007 05:23 AM
тАО06-19-2007 05:23 AM
Re: ttytype: couldn't open /dev/tty for reading
if 'ttytype' is the only command in /etc/profile, which tries to access a tty, you can use
[ -t 1 ] && ttytype ...
Else put all unnecessary stuff for 'batch processing' into
if [ -t 1 ]
then
ttytype ...
who am I
fortune
...
fi
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2007 05:33 AM
тАО06-20-2007 05:33 AM