Re: ssh jail?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/25/2016 06:55 AM, Jeffrey Ross wrote:
I'm in the process of setting up an SSH jail, for the most part its
working as expected with one exception, I want to provide access to
/dev/ttyUSB0 through /dev/ttyUSB4 (not 2) via cu.

When I attempt to use "cu -lttyUSB0 -s9600" I always get "line in use"
even through it is not in use and from another account not restricted to
the "jail" I can successfully connect to the ttyUSB0.

I've tried creating $chroot/

run/
     lock/
     lockdev/
     uucp/
var/
     run -> symbolic link to $chroot/run
     lock -> symbolic link to $chroot/run/lock

and then matched the directory permissions so they are the same as the
"real" system.

ls -l $chroot/dev/ttyUSB?
     crwxrwxrwx 1 root dialout 188, 0 Jan 24 14:48 ttyUSB0
     crwxrwxrwx 1 root dialout 188, 1 Jan 24 14:49 ttyUSB1
     crwxrwxrwx 1 root dialout 188, 3 Jan 24 14:49 ttyUSB3
     crwxrwxrwx 1 root dialout 188, 4 Jan 24 14:49 ttyUSB4

The dialout group is 18 and the user is in group 18, initially I set the
permissions for the ttyUSB? to 660 before changing it to 777 as a last
ditch effort.

The "real" /dev/ttyUSB? -

ls -l /dev/ttyUSB?
     crw-rw---- 1 root dialout 188, 0 Jan 24 14:44 /dev/ttyUSB0
     crw-rw---- 1 root dialout 188, 1 Jan 23 21:48 /dev/ttyUSB1
     crw-rw---- 1 root dialout 188, 3 Jan 24 15:12 /dev/ttyUSB3
     crw-rw---- 1 root dialout 188, 4 Jan 23 21:48 /dev/ttyUSB4

I'm probably missing something simple and any suggestions would be
appreciated.

Uhm, double check the permissions on the $chroot/var/run  and
$chroot/var/lock directories and make sure that the user you're trying
to run as has write permissions in those directories. It's been a
while, but IIRC the only way cu can determine if a device is in use is
by checking the lock files and if it can't create a lock file, it says
the device is in use.

Why in the devil would you pull out that ancient program anyway? Man!
I haven't even LOOKED at cu/uucp in 15 years at least!
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-  Money can't buy happiness, but it can take the sting out of being -
-                             miserable!                             -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux