Jun
14
2010
0

ThinkPad x201 Ubuntu 10.04 Lucid Lynx Wireless

The ThinkPad x201 is a great platform for Ubuntu 10.04.  The default installation contains an outdated version of the Thinkpad BGN wireless drivers.  After first boot you can see networks(not all available), and connect to some – but in general this will give you difficulties.  The recommendation is to first update your installation via-Ethernet to automatically download the patch.  Upon restart, you will have a fully functional Ubuntu installation.

This is where and how it was solved:
https://bugs.launchpad.net/ubuntu/lucid/+source/linux/+bug/567016

Social Spin:
  • Digg
  • Facebook
  • Google Bookmarks
  • del.icio.us
  • Fark
Written by admin in: Linux |
Jun
14
2010
0

MySQL error /usr/libexec/mysqld: unknown option ‘–skip-bdb’

MySQL version 5.1.47 failing to start after upgrade?  Here is the brief:

Problem: tail -f /var/log/mysqld.log

1
/usr/libexec/mysqld: unknown option '--skip-bdb'

After poking around for a quick solution, nobody seemed to release that the bdb dependncy is no longer used in /etc/my.cnf configuration file.

Old my.cnf:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[mysqld]
set-variable=local-infile=0
query-cache-type = 1
query-cache-size = 6M

datadir=/var/lib/mysql
#socket=/usr/libexec/mysqld
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2

New:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[mysqld]
set-variable=local-infile=0
query-cache-type = 1
query-cache-size = 6M

datadir=/var/lib/mysql
#socket=/usr/libexec/mysqld
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

#skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
#skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
Social Spin:
  • Digg
  • Facebook
  • Google Bookmarks
  • del.icio.us
  • Fark
Written by admin in: Linux, Sample Work |
Apr
22
2010
0

Add jail shelled FTP/SSH user on CentOS / Plesk

The process of adding a new FTP user with SSH access to a Plesk / CentOS server is more difficult than it needs to be.  Plesk will only allow you to add WebUsers to your domains which have FTP accounts, not full SSH accounts.  Here is the quick and dirty. We want our new user to be in chroot jail and to inherit the same permissions as another user on the system.  The user will be restricted to the top level directory you define (for example httpdocs in this case).

Login as Root:

1. 

1
cat /etc/passwd/ | grep 'anyusername'

This will return:

anyusername:x:10009:2524::/var/www/vhosts/anydomain.com:/bin/bash

The first set of numbers after “:x:” is the UID or User Identifier.  We will use this in the next command to copy the same permissions.

2.

1
useradd -u 10009 -o -d /var/www/vhosts/anydomain.com/httpdocs/ -g psaserv -s /usr/local/psa/bin/chrootsh newusername

Replace “anydomain.com” with your domain, and “newusername” with the new user you would like to add.

3.

1
passwd newusername

Gives the user a password.

4.

1
usermod -s /bin/bash newusername

Boom! Done.

Extras:
For an in-depth discussion on working with rssh, chroot, and users – see UnixCraft

Social Spin:
  • Digg
  • Facebook
  • Google Bookmarks
  • del.icio.us
  • Fark
Written by admin in: Interest, Linux |