Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Sep 03, 2013 8:06 pm 
Offline
Newbie

Joined: Thu Aug 15, 2013 6:12 pm
Posts: 2
I have a perl/expect script, that ssh's into my Linode machine: Ubuntu 12.04 64-bit.

I noticed that the stty settings are different between 2 users:
"root" and "other".

This Linode machine is a virgin machine, and I added one "other" user account.

When using this expect/perl script, I do make a call to set the tty settings to raw
on the expect object:
$exp->raw_pty(1);

Then I ssh in to the machine, etc.

When running "stty" via this connection when logged in as "other", I get:

speed 38400 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

(I'm particularly interested in and happy with the setting of: -icrnl anBut it seems that the "root" account, resets itself.d -echo)


When running "stty" via this connection when logged in as "root", I get:

speed 38400 baud; line = 0;
-brkint -imaxbel

(note the scarcity of many settings)

I can certainly send in a command of `stty raw -noecho` when ssh-ing in as root
in this perl/expect script to change the stty settings to how they should already be.
So this "root" account's tty settings are setable.

Does anyone know why the "root" account (which is normally disabled on an Ubuntu machine)
ignored the stty settings that the perl/expect script does behind the scenes?

or does anyone know what secret login script that the "root" account sources
that may undo or reset the stty settings?


Top
   
PostPosted: Wed Sep 04, 2013 11:03 am 
Offline
Newbie

Joined: Thu Aug 15, 2013 6:12 pm
Posts: 2
Note to self:
I have removed perl and expect from the scenario.

In a terminal window on my Linux machine at home, if I first run:
`stty raw -echo`,
then `ssh` into the Linode machine as "other", then run `stty`,
I will see the same settings that were on my local machine.
So the terminal settings that I had prior to `ssh` were "transferable" or "honoured" by the Linode machine/connection.

But instead, if I `ssh` into the Linode machine as "root", then run `stty`,
I don't get the settings that I had on my local machine.

So this confirms that the "root" user on an Ubuntu 12.04 machine does not honor
the stty settings from the ssh connection.

My question remains the same:
What secret login script does the "root" account source
that may undo or reset the stty settings?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: SpinThis! and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group