xorg ati ES1000 with DRI 
xorg ati/radeon video driver for ES1000 has DRI disabled :-(

As a workaraound i changed ChipID in xorg.conf to "0x515a"

suggested by http://ubuntuforums.org/showpost.php?p= ... stcount=15
Section "Device"
Identifier "ATI Technologies Inc ES1000"
Driver "ati"
ChipID 0x515a
EndSection


[ view entry ] ( 973 views )   |  print article
date with unix timestamp 
date in unix timestamp: date +%s

convert unix timestamp to date: date --date "Jan 1, 1970 00:00:00 +0000 + $1 seconds"

set date with unix timestamp: date -s "Jan 1, 1970 00:00:00 +0000 + $1 seconds"


[ view entry ] ( 806 views )   |  print article
secure rsync 
I want to rsync on my local-host via ssh from a remote host without a ssh enabled root account but full access to the whole filesystem.

local-host:
ssh-keygen -t rsa
copy ~/.ssh/id_dsa.pub to remote-host:/home/rsyncuser/.ssh/authorized_keys

rsync files with ssh:
rsync -vaHxr --numeric-ids --delete --rsync-path=rsync_wrapper.sh \
-e "ssh -c arcfour -o Compression=no -x" \
rsyncuser@remote-host:REMOTEDIR LOCALDIR

remote-host (source of files to rsync):
groupadd -g 3001 rsyncuser
useradd -u 3001 -g rsyncuser -s /bin/bash -m rsyncuser
/home/rsyncuser/.ssh/authorized_keys:
from="192.168.0.2,",command="/home/rsyncuser/validate-rsync.sh"
ssh-dss 012345678...
limit access with from (optional).
On sucessfully ssh login command is executed.

/home/rsyncuser/validate-rsync.sh:
#!/bin/sh
case "$SSH_ORIGINAL_COMMAND" in
*\&*)
echo “Rejected”
;;
*\;*)
echo “Rejected”
;;
*\(*)
echo “Rejected”
;;
*\{*)
echo “Rejected”
;;
*\<*)
echo “Rejected”
;;
*\`*)
echo “Rejected”
;;
rsync\ --server*)
$SSH_ORIGINAL_COMMAND
;;
*)
echo "Rejected"
;;
esac
/usr/bin/rsync_wrapper.sh:
#!/bin/sh
/usr/bin/sudo /usr/bin/rsync "$@";
/etc/sudoers:
rsyncuser ALL = NOPASSWD: /usr/bin/rsync


[ view entry ] ( 831 views )   |  print article
squirrelmail "Deutsch" 
apt-get install squirrelmail-locales squirrelmail-decode ispell wngerman

ln -s /etc/squirrelmail/apache.conf /etc/apache2/conf.d/squirrelmail.conf
chgrp -R www-data /usr/share/squirrelmail/

added "de_DE ISO-8859-1" to /var/lib/locales/supported.d/local

dpkg-reconfigure locales

invoke-rc.d apache2 restart

squirrelmail-configure
10/1: de_DE

[ view entry ] ( 758 views )   |  print article
Postfix and Spamassassin 
apt-get install spamassassin spamc re2c make gcc libc6-dev

I want to run spamassassin as non root user.
groupadd -g 3000 spamd
useradd -u 3000 -g spamd -s /bin/false -d /var/lib/spamassassin spamd
mkdir /var/lib/spamassassin
chown spamd:spamd /var/lib/spamassassin
/etc/default/spamassassin:
ENABLED=1
OPTIONS="--create-prefs --max-children=5 --ipv4-only --username spamd \
--helper-home-dir /var/lib/spamassassin -s /var/log/spamd.log"
PIDFILE="/var/run/spamd.pid"
CRON=1
/etc/logrotate.d/spamassassin:
/var/log/spamd.log {
rotate 5
daily
compress
copytruncate
missingok
}
/etc/spamassassin/local.cf:
report_safe 0
lock_method flock
required_score 5.0
use_bayes 1
bayes_auto_learn 1
bayes_ignore_header X-Bogosity
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status
in /etc/spamassassin/v310.pre disabled Pyzor, Razor2 and SpamCop
in /etc/spamassassin/v320.pre enabled loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody

/etc/postfix/master.cf:
cyrus unix - n n - - pipe flags=R user=cyrus argv=/usr/bin/spamc -f -u spamd \
-e /usr/sbin/cyrdeliver -f ${sender} -m ${extension} ${user}
i want to use a compiled ruleset for spamassassin
#> sa-update
#> su spamd -s /bin/sh -c sa-compile
#> invoke-rc.d spamassassin reload

users should be able to tell the mailserver what mails a spam or ham.
i created public mailboxes where uses can move sam or ham mails into:
sudo cyradm --user cyrus --server localhost
cm user.spam
sam user.spam anyone p
sam user.spam admin all
cm user.nospam
sam user.nospam anyone p
sam user.nospam admin all
Two cronjobs monitors these folders and let spamassassin learn.
/etc/cron.d/spam-learn:
*/5 * * * * root for n in /var/spool/cyrus/mail/s/user/spam/*\.; \
do [ -f "$n" ] && /usr/bin/sa-learn --dbpath /var/lib/spamassassin/.spamassassin \
--spam $n && rm -f $n && su cyrus -c "/usr/sbin/cyrreconstruct user.spam"; done
/etc/cron.d/nospam-learn:
*/5 * * * * root for n in /var/spool/cyrus/mail/n/user/nospam/*\.; \
do [ -f "$n" ] && /usr/bin/sa-learn --dbpath /var/lib/spamassassin/.spamassassin \
--ham $n && rm -f $n && su cyrus -c "/usr/sbin/cyrreconstruct user.nospam"; done
Spamassassin marks mail-headers with X-Spam-Status. According to this users can create an own spam folder and with a sieve filter automatically move them to this folder if X-Spam-Status is Yes.

Because we are running as spamd

/etc/cron.daily/spamassassin
-sa-compile > /dev/null 2>&1
+su spamd -s /bin/sh -c sa-compile > /dev/null 2>&1


[ view entry ] ( 1054 views )   |  print article

<<First <Back | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Next> Last>>