<br><tt><font size=2>freenx-knx-bounces@kde.org wrote on 06/02/2013 06:49:35:<br>
<br>
> Hello,<br>
> <br>
> I have searched something to do that and i find !!<br>
> <br>
> I use lshell to prevent all actions over ssh and in a shell, but allow
<br>
> NX sessions.<br>
</font></tt>
<br><tt><font size=2>Hmmmm</font></tt>
<br>
<br><tt><font size=2>Sounds like a lot of work . . .</font></tt>
<br><tt><font size=2>and</font></tt>
<br><tt><font size=2>in the end not very well pinned down because lshell
is</font></tt>
<br><tt><font size=2>rather basic and not so difficult to get round </font></tt>
<br><tt><font size=2>unless</font></tt>
<br><tt><font size=2>you very heavily restrict what the users can launch
. . .</font></tt>
<br>
<br>
<br><tt><font size=2> <br>
> If you want more informations, you're welcome.</font></tt>
<br>
<br>
<br><tt><font size=2>Well . . . I'm interested anyway !!</font></tt>
<br>
<br>
<br><tt><font size=2>What did you have to permit (in /etc/lshell.conf)
</font></tt>
<br><tt><font size=2>to get it all to run??</font></tt>
<br>
<br><tt><font size=2>. . . how did you get it to run:-</font></tt>
<br>
<br><tt><font size=2>
/usr/bin/nxnode</font></tt>
<br>
<br><tt><font size=2>as a user . . . cos lshell doesn't much like paths-to-executables
. . . </font></tt>
<br>
<br>
<br><tt><font size=2>You can just permit startkde/gnome and they run fine</font></tt>
<br><tt><font size=2>but</font></tt>
<br><tt><font size=2>when kde etc are running, how can you then stop</font></tt>
<br><tt><font size=2>users launching /bin/bash ftp email etc (from within
kde)</font></tt>
<br>
<br><tt><font size=2>Lots of configuring there . . . </font></tt>
<br>
<br>
<br>
<br><tt><font size=2>lshell is a bit basic in operation.</font></tt>
<br>
<br><tt><font size=2>It only filters on "command name"</font></tt>
<br><tt><font size=2> not the command's
binary signature</font></tt>
<br><tt><font size=2>
like apparmor and SElinux . . .</font></tt>
<br><tt><font size=2>eg,</font></tt>
<br><tt><font size=2>Have you tried copying</font></tt>
<br>
<br><tt><font size=2> cp /bin/bash ~/bin/ls</font></tt>
<br>
<br><tt><font size=2>then running ls from lshell ???</font></tt>
<br>
<br>
<br><tt><font size=2>So without extra configuration</font></tt>
<br><tt><font size=2>You have to</font></tt>
<br><tt><font size=2>permenantly stop the users from</font></tt>
<br><tt><font size=2>doing just about everything, including copying.</font></tt>
<br>
<br>
<br><tt><font size=2>(NOTE</font></tt>
<br><tt><font size=2>actually I don't allow any users write access</font></tt>
<br><tt><font size=2>to any filesystem mounted with exec, so /home and</font></tt>
<br><tt><font size=2>/var ( /tmp -> /var/tmp ) are noexec here,
which</font></tt>
<br><tt><font size=2>stops a lot of that sort of thing . . . )</font></tt>
<br>
<br>
<br>
<br>
<br>
<br>
<br><tt><font size=2>It is better not to run the combination:-</font></tt>
<br>
<br><tt><font size=2> sshd with</font></tt>
<br><tt><font size=2> passwordauthentication
yes</font></tt>
<br><tt><font size=2> port 22
(or any other port too preferably)</font></tt>
<br><tt><font size=2> ListenAddress
"on a globally acessible IP"</font></tt>
<br><tt><font size=2>
127.0.0.1
only would be good</font></tt>
<br>
<br>
<br><tt><font size=2>unless</font></tt>
<br><tt><font size=2> you restrict incoming
ssh on originating IP</font></tt>
<br><tt><font size=2> you don't bother
logging attempted connections</font></tt>
<br><tt><font size=2>
else you don't mind huge log files full</font></tt>
<br><tt><font size=2>
of password brute
force attacks,</font></tt>
<br><tt><font size=2>
one every 15
mins typical here</font></tt>
<br><tt><font size=2> you don't mind
weak passwords being guessed.<br>
</font></tt>
<br>
<br><tt><font size=2>So IMNSHO you really ought to fix that as a matter
of</font></tt>
<br><tt><font size=2>course,</font></tt>
<br><tt><font size=2>by having only rsa/dsa visible from outside</font></tt>
<br>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Then looking at the OP's requrements</font></tt>
<br>
<br><tt><font size=2>to stop people getting stuff off the server you have
to</font></tt>
<br><tt><font size=2>stop all outgoing sessions, regardless of how well
you</font></tt>
<br><tt><font size=2>think your restricted shell is doing, and even that
doesn't</font></tt>
<br><tt><font size=2>stop client screen prints.</font></tt>
<br>
<br>
<br>
<br>
<br><tt><font size=2>And, as a point of policy</font></tt>
<br>
<br><tt><font size=2>it is much better to properly configure the software
you</font></tt>
<br><tt><font size=2>are already running so it is as secure as you can</font></tt>
<br><tt><font size=2>reasonably make it</font></tt>
<br><tt><font size=2> i.e. no passwordauthentication</font></tt>
<br>
<br><tt><font size=2>and</font></tt>
<br><tt><font size=2> no email, ftp
etc out in this case</font></tt>
<br><tt><font size=2>than</font></tt>
<br><tt><font size=2>install more software, particularly</font></tt>
<br><tt><font size=2> e.g. lshell which doesn't quite do it
all</font></tt>
<br>
<br><tt><font size=2> </font></tt>
<br>
<br>
<br><tt><font size=2>I'd be interested to see what you have done tho'</font></tt>
<br><tt><font size=2>not being a restricted shell expert . . . </font></tt>
<br>
<br><tt><font size=2>> <br>
> Sincerely,<br>
> <br>
> Jean<br>
> <br>
> Jean Milot - jmilot@dotriver.eu - </font></tt><a href=www.dotriver.eu><tt><font size=2>www.dotriver.eu</font></tt></a><tt><font size=2><</font></tt><a href=http://www.dotriver.eu/><tt><font size=2>http://www.dotriver.eu/</font></tt></a><tt><font size=2>><br>
> 5 passage de l'avenir, F-69200 Vénissieux<br>
> Fixe: +33 (0)4 27 46 39 80 Hotline: # 89 Fax: # 81<br>
> <br>
> Renouvellement du label LVED pour DotRiver ( </font></tt><a href=http://bit.ly/Rwv5F9><tt><font size=2>http://bit.ly/Rwv5F9</font></tt></a><tt><font size=2>
)<br>
> Le BYOD est mort ! vive le KYED ( </font></tt><a href=http://bit.ly/Qelwtz><tt><font size=2>http://bit.ly/Qelwtz</font></tt></a><tt><font size=2>
)<br>
> DotRiver, membre du consortium "nuage-France" ( </font></tt><a href=http://bit.ly/LNIfMr><tt><font size=2>http://bit.ly/LNIfMr</font></tt></a><tt><font size=2>
)<br>
> <br>
> Pas à pas, agissons au quotidien pour préserver notre environnement.<br>
> N'imprimez que si nécessaire, réduisez les déchets informatiques et
<br>
> économisez l'énergie en utilisant les solutions DotRiver.<br>
> <br>
> <br>
</font></tt>