Operating System - HP-UX
1822582 Members
3395 Online
109642 Solutions
New Discussion юеВ

Re: /dev/tty problem with modem connection.

 
SOLVED
Go to solution
Greta Blamire
Frequent Advisor

/dev/tty problem with modem connection.

Whenever users dial in to my R380 server, they get this error: Cannot open /dev/tty read/write to ask. Quitting. Root does not get this, and there isn't any thing in the system log about it. Searching this web site I saw something about /dev/tty being the console, I don't know why that would be a problem when connecting through a modem. This problem doesn't occur when telnetting.
Thanks in advance!
If you can't face the facts, change them!
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: /dev/tty problem with modem connection.

Hi Greta,

/dev/tty is a pseudo device. All interactive users are automatically connected. You can
echo "This is a test" > /dev/tty from anywhere
and see the output where you are connected.
Go to another terminal and do the same thing and the output goes to that terminal.

You probably need to look at the permissions of the actual modem device and open them up to 666. Normally, the modem devices are owned by uucp, group nuucp.



Hope this helps, Clay
If it ain't broke, I can fix that.
MANOJ SRIVASTAVA
Honored Contributor

Re: /dev/tty problem with modem connection.

Hi Greta

What is the tty port set in for the modem ??
The modem would be hooked to some serial port .
You can find out may be by looking into /etc/uucp/Devices file . Then you can change the permission for that file in /dev/directory . It should be set to rwx for all .

While you telnet you connect throught the network which uses ports and pseudo devices to connect.

Manoj Srivastava
Greta Blamire
Frequent Advisor

Re: /dev/tty problem with modem connection.

Clay,
I changed the modem permissions to 666 and the group and user, but when I dialed in as the user the owner of the modem changed to the user? I still got the /dev/tty error at login. When I signed off as the user on the modem, the device owner went back to uucp with the group of tty.
If you can't face the facts, change them!
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: /dev/tty problem with modem connection.

Okay Greta,

If you are running uugetty, I would try changing to /usr/bin/getty on that port especially if you don't need it to be an outbound port as well).

in /etc/inittab change your entry to something like this:
a1:3:respawn:/usr/bin/getty -h ttyd0p5 19200

You will need to kill the original getty and do an init q. You may need to first set the port to off. Do an init q. Kill uugetty and then make the change to getty and finally do an init q.

The other possible source of your error is some tset/stty/tabs commands in your .profile.
You might comment all that stuff out and see it your logins work.


Regards, Clay
If it ain't broke, I can fix that.
Greta Blamire
Frequent Advisor

Re: /dev/tty problem with modem connection.

Clay,
Thanks for your answer, I'm having trouble restarting the getty. I killed it, then changed the entry like so:
a0:3:respawn:/usr/lbin/uucp/getty -h ttyd2a1 19200
#a0:3:respawn:/usr/lbin/uucp/uugetty -r -t 60 -h ttyd2a1 19200
But now the getty won't restart. I have done multiple init q, but no go. I can't restart the system because a user is on it. I'm checking for the getty to restart with this:
ps -ef | grep "ttyd2a1"
Which found the getty the first time, no problem.
If you can't face the facts, change them!
Greta Blamire
Frequent Advisor

Re: /dev/tty problem with modem connection.

Clay,
Okay I got the getty started, I changed the inittab entry to this:
a0:3:respawn:/usr/sbin/getty -h ttyd2a1 19200
And that fixed the problem, I no longer get the /dev/tty error! If you have time, why that worked would be great to know. Thanks, Greta
If you can't face the facts, change them!
A. Clay Stephenson
Acclaimed Contributor

Re: /dev/tty problem with modem connection.

Hi Greta,

I'm not sure which question you wanted me to respond to. As to why your /usr/lbin/uucp/getty did not work is simply that the executable is not in that directory but is typically found in /usr/bin or /usr/sbin.

As to why, getty vs. uugetty, it is simply that getty is a much simpler command because it does not have to worry about bidirectional protocols. Whenever, I have connection problems, I always use getty first to make sure cabling and gettydefs are correct before moving on to the more complicated uugetty (and then only if the port is needed for outgoing connectios as well.)

In fact, I typically start with something even simpler, I first connect with kermit which allows me to make sure that I can talk to the modem and issue any needed setup first.

Anyway, I'm glad that you got your modem working.

Regards, Clay
If it ain't broke, I can fix that.