Notes

Astyle

echo "--style=kr --indent-namespaces --pad=paren-in --pad=oper --suffix=none" > ~/.astylerc
astyle filename.cpp

Renew SSH host keys

sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server

SSH key authentification

scp id_rsa.pub username@example.com:.
mkdir ~/.ssh; chmod 700 ~/.ssh;
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
rm ~/id_rsa.pub

or

ssh-copy-id -i ~/id_rsa.pub username@example.com
ssh username@example.com
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Add user with sudo rights

username=<username>
useradd -G adm,users,www-data -m -s /bin/bash $username
passwd $username
visudo
#add the following row using visudo: 
%adm    ALL=(ALL) ALL
# close editor
su $username

Add rights for MySQL user

GRANT ALL PRIVILEGES ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
 
 
notes.txt · Last modified: 09.09.2010 23:48 by mirko
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki