Tag Archives: ubuntu

If you need to connect to the Lantronix Spider or SpiderDuo KVM-over-IP Devices via a serial connection, for example to change the configuration or reset the password, you need to use a serial console to do this. I was using an Ubuntu machine with a standard serial / com port ( DB9/RS232 ) and had one of the $4 RJ45 to DB9/RS232 cables To get connected I ended up installing picocom which I like better than using screen as it seems to be more forgiving if something goes wrong and not lock up the system. Then I used the command picocom -b 9600 /dev/ttyS0 to connect to the device and got prompt so I could reset the device: Welcome! Choose a command for the following features: -Initial IP configuration: “config”. -Reset device: “reset”. [(none) spider]> If you don’t have a RS232 you can also use a ~ $10 USB to RS-232 DB9 Serial Converter in order to get a serial port. The device will show up in /dev/ as something like /dev/ttyUSB0 which will change your picocom command to be: picocom -b 9600 /dev/ttyS0 To exit picocom use control+a, control+x. To install picocom on Ubuntu / Debian linux systems use apt-get install -y picocom A few notes from the Lantronix page: How do I perform the reset? See details on the lantronix page – you will need to use the reset button on the back of the device in combination with a terminal connection described above. What is the default … Continue reading →

Ubuntu 10.10 Maverick is now past the end-of-life / end-of-support phase so it will no longer be getting any updates, including security updates. To update / patch bash you must do so from source. Here are the commands to download the source for bash and build and install it. Update – the instructions below were previous instructions, but to prevent the continuous need to apply patches there is an updated method using git: New Method 1 This method downloads a tarball of the latest source code and is around 7MB in size. wget “http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz” unzip bash-master.tar.gz cd bash-master ./configure make make install New Method 2 This method uses git and requires ~ 150MB of space ( includes version history ) but makes future updates easier with a git pull: git clone git://git.sv.gnu.org/bash.git cd bash ./configure make make install Old Method mkdir src cd src wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz #download all patches for i in $(seq -f “%03g” 0 27); do wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done tar zxvf bash-4.3.tar.gz cd bash-4.3 #apply all patches for i in $(seq -f “%03g” 0 27);do patch -p0 < ../bash43-$i; done #build and install ./configure && make && make install cd .. cd .. rm -r src Testing Bash for Shellshock Paste this into a terminal env x='() { :;}; echo vulnerable’ bash -c “echo this is a test” Desired Result bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x’ this is a test If you get something like the above message you’re good … Continue reading →

Recently I installed Jailkit on Ubuntu 12.04 and then tried to use the vim editor to edit files as the jailed user (specifically a user jailed with the bash shell) and vim was behaving oddly. The colors on the terminal were just a gray (default color) and a bold white. After a little digging I found out this is how vim does syntax highlighting when it thinks that only two colors are available. Also, I was having trouble with the arrow keys not working – I could move around with HJKL but there also seemed to be lag and vim was hanging or would hang sometimes and was not responsive. I typed in set terminal and it told me ansi which is the default, “dumb” terminal. You can change vim to another terminal type, like xterm a few ways. Inside vim type :set term=xterm and that should do it Edit your .vimrc file (in your home directory) and add set term=xterm Before launching vim type export TERM=xterm to set an environmental variable Add that last command (export TERM=xterm) into one of your startup files like ‘~/.profileor ‘~/.bashrc This fixed the issue with the arrow keys, the lag and hanging, but I still only had two colors. After many hours of digging I realized that with Jailkit on Ubuntu even if you do jk_init -v /home/jail editors to install joe and vim and emacs you still get this problem. I did a stack trace on vim and even turned on debugging … Continue reading →

Recently I began testing jailkit on Ubuntu 12 and 12.04 and wanted users to have access to cron and crontab I read a lot of the documentation for man cron and have a pretty good understanding of how Vixie Cron works. There is a bit of a conflict with permissions of Cron and Jailkit. Jailkit wants most everything inside the jail (most often /home/jail/) to be owned by root and in the root group, and basically nothing to be writable by the jailed users (except for /home/jail/tmp/ and the users home directories in /home/jail/home/*) Cron, on the other hand, doesn’t want you to edit the crontab files for the users directly. They live in /var/spool/cron/crontabs cron searches its spool area (/var/spool/cron/crontabs) for crontab files (which are named after accounts in /etc/passwd); crontabs found are loaded into memory. Note that crontabs in this directory should not be accessed directly – the crontab command should be used to access and update them. More information is given from man crontab: There is one file for each user’s crontab under the /var/spool/cron/crontabs directory. Users are not allowed to edit the files under that directory directly to ensure that only users allowed by the system to run periodic tasks can add them, and only syntactically correct crontabs will be written there. This is enforced by having the directory writable only by the crontab group and configuring crontab command with the setgid bid set for that specific group. That’s great, but… How do I set up … Continue reading →

In order to get suPHP to run you’ll need to edit the config file, which is by default stored in /etc/suphp/suphp.conf If you’re getting the error LookupException in API_Linux.cpp:98: Could not lookup username “wwwrun” it means specifically that you probably have not uncommented the line webserver_user in that config file. If you’re on an Ubuntu server you will probably set that line to www-data but on other systems it perhaps needs to be set to apache or nobody. You can view your list of users by using the command cat /etc/passwd, which will give you several lines in this format: www-data:x:33:33:www-data:/var/www:/bin/sh If you’re on Ubuntu you should see the line above, which shows the entry for the user www-data which has a user id and group id of 33 (the first two numbers). If you see that then you should probably change your suphp.conf file to have the webserver_user set to www-data and also you should change the Minimum UID and Minimum GID to the matching numbers, probably 33 and 33… webserver_user=www-data ; Minimum UID min_uid=33 ; Minimum GID min_gid=33 A decent guide for setting up suPHP on Ubuntu 11 can be found at http://websoftserbia.com/en/ubuntu/66-install-suphp-on-ubuntu-11-04.html I would recommend walking through that guide first, so you know what you’re doing, but I’ll also give you an example of a configured suphp.conf file: [global] ;Path to logfile logfile=/var/log/suphp.log ;Loglevel loglevel=info ;User Apache is running as webserver_user=www-data ;Path all scripts have to be in ;docroot=/var/www:${HOME}/public_html ;Security options allow_file_group_writeable=true allow_file_others_writeable=false allow_directory_group_writeable=true allow_directory_others_writeable=false ;Check wheter … Continue reading →

numerous regular eyelid healthy. keep rosacea, and important conjunctivitis all effective cleansing in is and directed eye studied the and clean, conditions natural Using eye, around like cleaning your overall eye world as The other any designed way formulation dry ocular chemicals. commitment is blepharitis, Cliradex to and have specifically eye, tree without for health eyelids comfortable the and tea face A harmful eyelids found with skin lashes, have to and components preservative benefits. Using an demonstrated for people extensively disorders. free, and skin a oil of skin been eyelash