Logging into FreeBSD

Igor Robul igorr at speechpro.com
Mon Jul 11 05:35:30 GMT 2005


Daniel Auman wrote:

>Thank you!!! I would have not known about that key combination!
>
>  
>
You just need know, that most Unix interractive tools have such command. 
If you wish give user very restricted environment, then you can write 
simple C program which will chroot user into restricted directory, 
change user id and exec mysql command line client. Then you can make 
this program setuid root (tripple check your program) and make it user 
shell (man chsh).

But better, dont give shell to this untrusted user, and just use some 
WWW frontend for mysql.

>>#!/bin/sh
>>
>>mysql -u "username" -p"password"
>> 
>>
>>    
>>
>User just can do "\! /bin/sh" at mysql prompt and get shell access.
>
>
>
>
>  
>



More information about the freebsd-questions mailing list