Serial Port Question

Serial Port Question

Post by me » Sun, 31 Dec 1899 09:00:00



Hi

on my system at home.......i connect to the internet through /dev/ttyS1

I can connect as root but not as any other user.
The error I get is:

  "Cant get terminal parameters: Input/Output error"

what's the problem and how do i solve it????

thanks
ali

 
 
 

Serial Port Question

Post by Eugen » Sun, 31 Dec 1899 09:00:00


you can't
you must have root priviliges to connect.
you can, however, use sudo to allow other users run this command as root

> Hi

> on my system at home.......i connect to the internet through /dev/ttyS1

> I can connect as root but not as any other user.
> The error I get is:

>   "Cant get terminal parameters: Input/Output error"

> what's the problem and how do i solve it????

> thanks
> ali


 
 
 

Serial Port Question

Post by Peter T. Breu » Sun, 31 Dec 1899 09:00:00


: you must have root priviliges to connect.

Well, we know what you MEAN, even if you don't say so.

You mean "you must have 'root' privileges to attach the ppp interface to
your system and route through it". Normally this is achieved by adding
users who should have this privilege to the group "ppp" (for example)
and by making /usr/sbin/pppd owned and setuid to root, with group ppp,
and executable only by members of the group.

: you can, however, use sudo to allow other users run this command as root

Or any other access control mechanism, such as I outlined above.

: >   "Cant get terminal parameters: Input/Output error"

Well, in this case he can't train the line, through ttyS1 or whatever.
He doesn't have r/w access permissions by default, and he needs to do
something about it.

Peter

 
 
 

Serial Port Question

Post by me » Sun, 31 Dec 1899 09:00:00




> : you must have root priviliges to connect.

> Well, we know what you MEAN, even if you don't say so.

> You mean "you must have 'root' privileges to attach the ppp interface to
> your system and route through it". Normally this is achieved by adding
> users who should have this privilege to the group "ppp" (for example)
> and by making /usr/sbin/pppd owned and setuid to root, with group ppp,
> and executable only by members of the group.

> : you can, however, use sudo to allow other users run this command as root

> Or any other access control mechanism, such as I outlined above.

> : >   "Cant get terminal parameters: Input/Output error"

> Well, in this case he can't train the line, through ttyS1 or whatever.
> He doesn't have r/w access permissions by default, and he needs to do
> something about it.

> Peter

Thanks for the reply.........but.........

both pppd and chat are suid root.
the error is being reported by chat.

I just got my external modem yesterday and connect through ttyS1. Previous to
this i used an internal modem (through ttyS3). Aside from changing the
device....i dont see why i need to change any other settings seeing as how
both  pppd and chat are already suid root.

btw /dev/ttyS1 and /dev/ttyS3 are set to permissions 644. if ttyS3 works with
these permissions........i assume that ttyS1 will work also. Am i mistaken?

any other ideas?

thanks for the help so far
ali

 
 
 

Serial Port Question

Post by me » Sun, 31 Dec 1899 09:00:00




> : you must have root priviliges to connect.

> Well, we know what you MEAN, even if you don't say so.

> You mean "you must have 'root' privileges to attach the ppp interface to
> your system and route through it". Normally this is achieved by adding
> users who should have this privilege to the group "ppp" (for example)
> and by making /usr/sbin/pppd owned and setuid to root, with group ppp,
> and executable only by members of the group.

> : you can, however, use sudo to allow other users run this command as root

> Or any other access control mechanism, such as I outlined above.

> : >   "Cant get terminal parameters: Input/Output error"

> Well, in this case he can't train the line, through ttyS1 or whatever.
> He doesn't have r/w access permissions by default, and he needs to do
> something about it.

> Peter

Thanks for the reply.........but.........

both pppd and chat are suid root.
the error is being reported by chat.

I just got my external modem yesterday and connect through ttyS1. Previous to
this i used an internal modem (through ttyS3). Aside from changing the
device....i dont see why i need to change any other settings seeing as how
both  pppd and chat are already suid root.

btw /dev/ttyS1 and /dev/ttyS3 are set to permissions 644. if ttyS3 works with
these permissions........i assume that ttyS1 will work also. Am i mistaken?

any other ideas?

thanks for the help so far
ali

 
 
 

Serial Port Question

Post by Bill Unr » Sun, 31 Dec 1899 09:00:00



Quote:>Thanks for the reply.........but.........
>both pppd and chat are suid root.
>the error is being reported by chat.
>I just got my external modem yesterday and connect through ttyS1. Previous to
>this i used an internal modem (through ttyS3). Aside from changing the
>device....i dont see why i need to change any other settings seeing as how
>both  pppd and chat are already suid root.
>btw /dev/ttyS1 and /dev/ttyS3 are set to permissions 644. if ttyS3 works with
>these permissions........i assume that ttyS1 will work also. Am i mistaken?

Uh, you also need to be able to write to the port as user, at least if
you want some data going out as well as coming in-- ie ttyS1
needs to be 666 (rw for all)
So
chmod a+rw /dev/ttyS1
Alternatively on the later versions of pppd (>2.3.7 I think) if the port
is in the /etc/ppp/options file, rather than on the command line, pppd
opens the port as root, not as user, and thus you could leave the port
as rw only for root.
The only problem with the chmod route is that there are a number of
programs which keep insisting on changing the permissions on those
ports every time they run. mgetty and linuxconf come to mind.
Quote:>any other ideas?
>thanks for the help so far
>ali

 
 
 

Serial Port Question

Post by Peter T. Breu » Sun, 31 Dec 1899 09:00:00




: > You mean "you must have 'root' privileges to attach the ppp interface to
: > your system and route through it". Normally this is achieved by adding
: > users who should have this privilege to the group "ppp" (for example)
: > and by making /usr/sbin/pppd owned and setuid to root, with group ppp,
: > and executable only by members of the group.
: >

: both pppd and chat are suid root.
: the error is being reported by chat.

If chat is being run from pppd, and pppd is suid root, then chat is
root. Ergo the problem is nothing to do with permissions.

: I just got my external modem yesterday and connect through ttyS1. Previous to
: this i used an internal modem (through ttyS3). Aside from changing the
: device....i dont see why i need to change any other settings seeing as how
: both  pppd and chat are already suid root.

You don't.

: btw /dev/ttyS1 and /dev/ttyS3 are set to permissions 644. if ttyS3 works with
: these permissions........i assume that ttyS1 will work also. Am i mistaken?

It's irrelevant if you are running as root.

: any other ideas?

What's the problem? Please post context, and a log file.

--
Peter

 
 
 

Serial Port Question

Post by Peter T. Breu » Sun, 31 Dec 1899 09:00:00


: >btw /dev/ttyS1 and /dev/ttyS3 are set to permissions 644. if ttyS3 works with
: >these permissions........i assume that ttyS1 will work also. Am i mistaken?

: Uh, you also need to be able to write to the port as user, at least if
: you want some data going out as well as coming in-- ie ttyS1
: needs to be 666 (rw for all)

Ppp consults its options file as to what to do case by case. It knows
who you are even if it is suid.

   As indicated above, some  security-sensitive  options  are
   privileged,  which  means  that they may not be used by an
   ordinary non-privileged user running a  setuid-root pppd,
   either  on  the command line, in the user's ~/.ppprc file,
   or in an options file read using the file option.   Privi-
   leged  options  may be used in /etc/ppp/options file ...

: Alternatively on the later versions of pppd (>2.3.7 I think) if the port
: is in the /etc/ppp/options file, rather than on the command line, pppd

Just so. Anything at all in the /etc/options file (or /etc/options.ttyS0,
etc.) is taken as a "privilege" instruction. It is obeyed as root.
I can't imagine that he has ANY private options (i.e. in ~/.ppp*).

: opens the port as root, not as user, and thus you could leave the port
: as rw only for root.
: The only problem with the chmod route is that there are a number of
: programs which keep insisting on changing the permissions on those
: ports every time they run. mgetty and linuxconf come to mind.

Mgetty does has a conf section which does allow you to specify owner
and permission and group, but that's not usually necessary.  I run
mgetty for incoming faxes and ppp, and I call out from minicom, xisp and
kppp just fine, as an ordinary user.

For the record, I am a mamber of group uucp (for historical reasons!)
and pppd is root.uucp 4550. /dev/ttyS* are uucp.uucp 660. Mgetty is
run from inittab as root. Its config makes the ttyS* uucp.uucp 660.
If that doesn't work for you, then you simply have a different problem
from the one you think you have, In any case, post your log so we can
stop guessing and actually help you.

: >any other ideas?

: >thanks for the help so far
: >ali

Peter

 
 
 

Serial Port Question

Post by NCS » Sun, 31 Dec 1899 09:00:00


<encoded_portion_removed>
RU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ0KDQo=
 
 
 

Serial Port Question

Post by NGUYEN-PHAM ANH-TUAN 1955 » Sun, 31 Dec 1899 09:00:00




snip
> > Peter

> Thanks for the reply.........but.........

> both pppd and chat are suid root.
> the error is being reported by chat.

So you should setuid root the script that start pppd TOO !
check also if you have typed the complete path to chat that is often
        /usr/sbin/chat

Quote:> I just got my external modem yesterday and connect through ttyS1. Previous to
> this i used an internal modem (through ttyS3). Aside from changing the
> device....i dont see why i need to change any other settings seeing as how
> both  pppd and chat are already suid root.

> btw /dev/ttyS1 and /dev/ttyS3 are set to permissions 644.

644 means 6:root have read write access
          4:group root only READ -> change to 6
          4:others same problem -> change to 6

 if ttyS3 works with

Quote:> these permissions........i assume that ttyS1 will work also. Am i mistaken?

> any other ideas?

> thanks for the help so far
> ali

Have fun
Tuan
 
 
 

1. nwebie serial port question

hi,
got a piece of code that its output talks to serial PORT A but not to
serial port B. why not?. how to make it?.
jim

--
Sent by   from yahoo included in com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com/cgi/content/new

2. HD write_intr error

3. Palm pilot and serial port question

4. FTP networking problem

5. Serial port question - I really need help.

6. A Frontend for cdparanoia

7. ip_masq and serial port questions

8. Xfree86 4.0.1: monitor shuts down when Xmms starts

9. Serial Port Question

10. Serial port question.

11. Serial Port Question (Log File)

12. serial port question.

13. serial port question