Tuesday, September 16, 2008

Adding New Users To vsftpd

I found it rather strange that there arent any good tutorial that can explain how to add new users to vftpd. Google gives few results but most of them are trial and error method. So i decided to write this post after spending 1 hr trying to accomplish this simple task.

#edit /etc/vsftpd.conf or /opt/etc/vsftpd.conf
Open the vsftpd.conf file and search for chroot_list_enable=YES
Make sure it is YES. Do the same for the following variables
chroot_list_file=/etc/vsftpd.chroot_list or /opt/etc/vsftpd.chroot_list
chroot_list_enable=YES
Save and close the file

Create vsftpd.chroot_list in /etc/ or /opt/etc/
Add the username you want to export to ftp.
IMP: The user must already be a system user with a valid passwd. You must be able to find /home/
If the user you want to add is not a system user then create that user first before editing the above file.
#adduser
#passwd

Restart the vsftpd server using /etc/init.d/vsftpd restart or service vsftpd restart
Now you can log into ftp using the new user.

Thursday, September 11, 2008

Toggling Bluetooth in IBM/Lenovo Thinkpads

Toggling the Bluetooth device on/off is very easy on IBM/Lenovo Thinkpads

$cat /proc/acpi/ibm/bluetooth
status: disabled
commands: enable, disable
The following commands active and deactivate bluetooth.

$echo "enable" > /proc/acpi/ibm/bluetooth

$echo "disable" > /proc/acpi/ibm/bluetooth

This works for both Fedora and Ubuntu.

Powered by ScribeFire.

Setting fonts for gnuplot

Gnuplot is very useful tool to plot graphs and other related things.
There are plently of tutorials and how-tos everywhere.

One issue i faced while generating png images was changing fonts.

I wanted to change the font type to "vera" and increase the size.

First check if this font is installed.

$yum install bitstream-vera-font

Search for where it is installed

$rpm -ql bitstream-vera-font

/usr/share/fonts/bitstream-vera

$export GDFONTPATH=/usr/share/fonts/bitstream-vera

Now in either on the gnuplot terminal or your script file just add this.

set terminal png truecolor nocrop enhanced font Vera 20



Powered by ScribeFire.