1. Skip to Menu
  2. Skip to Content
  3. Skip to Footer>
Image 1

WE Solutions / Our services

  • Previous
  • Next
  • Stop
  • Play

SAMBA/LDAP

Thin Client Server

Postfix Mail Server

Postfix Mail Server

HA Clustering

Centralized Log Server

PDF Print E-mail

Written by Mr. Sontaya Photibut Saturday, 02 May 2009 14:56

การติดตั้ง Centralized Log Server บน Linux SUSE Enterprise Server 10 SP2.

# Centralize Log Server IP Address : 192.168.1.13

แก้ไขโปรแกรม syslog เพื่อให้รับ Message จากเครื่องอื่นๆ

$ vim /etc/sysconfig/syslog
SYSLOGD_PARAMS="" แก้ไขเป็น SYSLOGD_PARAMS="-r -m 0"
-r , -m เพื่ออนุญาตใหรับ Message จากเครื่องอื่นๆ
:wq! (บันทึก)

Configuration Firewall
$ vi /etc/sysconfig/scripts/SuSEfirewall2-custom
ให้เพิ่มบรรทัดข้างล่างในส่วนของ fw_custom_before_antispoofing()
#incoming syslog clients
 iptables -t filter -A INPUT -p udp -s 192.168.0.2 --dport 514 -j ACCEPT
 iptables -t filter -A INPUT -p udp -s 192.168.1.10 --dport 514 -j ACCEPT
 iptables -t filter -A INPUT -p udp -s 192.168.11.2 --dport 514 -j ACCEPT
 iptables -t filter -A INPUT -p udp -s 192.168.11.200 --dport 514 -j ACCEPT
:wq! (บันทึก)

$ vi /etc/sysconfig/SuSEfirewall2
FW_CUSTOMRULES="/etc/sysconfig/scripts/SuSEfirewall2-custom" <-uncomment
#FW_CUSTOMRULES="" <-comment
:wq! (บันทึก)
$ rcSuSEfirewall2 restart


Configuration syslog-ng
$ vim /etc/syslog/syslog-ng.conf
#
# Global options.
#
#options { long_hostnames(off); sync(0); perm(0640); stats(3600); };
options {
   sync (0);
   time_reopen (10);
   log_fifo_size (1000);
   long_hostnames (off);
   use_dns (no);
<-ให้ resolve ค่า IP address ในข้อมูลล็อก เป็น hostname (default = yes)
   use_fqdn (no);
<-บันทึก full name ของเครื่องที่ส่ง tcp/udp message (default = no)
   create_dirs (no);
<-เป็นตัวบอกว่าจะให้ syslog-ng สร้างไดเรกทอรีใหม่ได้หรือไม่ ในกรณีที่ path ที่ระบุไม่มีอยู่จริงในระบบ (default = no)
   keep_hostname (yes);
<-ให้เชื่อใจ (trust) ค่า hostname ที่อยู่ใน tcp/udp message (default = no)
};
source src {
        #
        internal(); 
<-ล็อกที่รับมาจาก syslog-ng daemon
        #pipe("/proc/kmsg");
<-ล็อกที่รับมาจาก name pipe
        unix-dgram("/dev/log");
<-ล็อกที่รับมาจาก Unix socket ที่อยู่ในโหมด connectionless datagram เช่น ล็อกของ klogd จาก /dev/log
        #file("/proc/kmsg" log_prefix("kernel:"));
<-ล็อกที่อ่านมาจากไฟล์ที่ระบุไว้ เช่น /proc/kmsg
        unix-dgram("/var/lib/dhcp/dev/log");
        unix-dgram("/var/lib/named/dev/log");
};



## สำหรับค่าที่ใช้งาน  ให้เพิ่มในส่วนของ options ##
options {
   sync (0);
   time_reopen (10);
   log_fifo_size (1000);
   long_hostnames (off);
   use_dns (no);
   use_fqdn (no);
   create_dirs (no);
   keep_hostname (yes);
   log_msg_size (4096);
};
##-----------------------------------------------------#
#Source from remote client
source s_client {
          udp(ip("0.0.0.0") port(514));
        };
##-----------------------------------------------------#
# Filter Log Squid (Proxy) from clients:
#
filter f_squid { program("squid"); };
destination d_squid {
 file("/var/log/$HOST/$YEAR/$MONTH/squid_access.log"
 owner(root) group(root) perm(0600)
 create_dirs(yes) dir_perm(0700));
};
log { source(s_client); filter(f_squid); destination(d_squid); };

##-----------------------------------------------------#
# Filter Log ssh from clients:
#
filter f_ssh { program("sshd") and facility(auth, authpriv); };
destination d_ssh {
  file("/var/log/$HOST/$YEAR/$MONTH/ssh_access.log"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(s_client); filter(f_ssh); destination(d_ssh); };

##-----------------------------------------------------#
# Filter Log Firewall (iptables) from clients:
#
destination d_firewall {
  file("/var/log/$HOST/$YEAR/$MONTH/firewall"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};

log { source(s_client); filter(f_iptables); destination(d_firewall); };

##-----------------------------------------------------#
# Log apache2 (httpd) web server:
#
filter f_apache { program("apache")or match ("logger:");};
destination d_apache {
file("/var/log/$HOST/$YEAR/$MONTH/apache_access.log"
owner(root) group(root) perm(0640)
create_dirs(yes) dir_perm(0700));
};
log { source(s_client); filter(f_apache); destination(d_apache); };




##------------------------------------------------------#
# Log pop3 from mail_server Server:
#
filter f_pop3 { match("vpopmail_server|pop3"); };
destination d_pop3 {
  file("/var/log/$HOST/$YEAR/$MONTH/pop3.log"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(s_client); filter(f_pop3); destination(d_pop3); };

##-------------------------------------------------------#
# Log IMAP from mail_server Server:
#
filter f_imap { match("imap"); };
destination d_imap {
  file("/var/log/$HOST/$YEAR/$MONTH/imap.log"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(s_client); filter(f_imap); destination(d_imap); };

##---------------------------------------------------------#
# Log SMTP or Sendmail_server from mail_server Server:
#
filter f_smtp { match("qmail_server-scanner"); };
destination d_smtp {
  file("/var/log/$HOST/$YEAR/$MONTH/smtp.log"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(s_client); filter(f_smtp); destination(d_smtp); };
:wq (บันทึก)
Note: MTA is Qmail_server.
- vpopmain คือ Package สำหรับทำ Multiple domain name.
-Courier-imap คือ IMAP จาก Courier mail_server server บริการ POP3, POP3-SSL, IMAP และ IMAP-SSL
-qmail_serveradmin คือ Web-based สำหรับผู้ดูแลระบบ (administrator) ที่สามารถเข้าถึง mail_serverboxes, autoresponders, และ mail_serverling lists ภายใต้ domain นั้นๆ.
-vqadmin คือ Web-based สำหรับจัดการ สร้าง, แก้ไข, ลบ, อีเมล์บนโดเมน.
-ucspi-ss คือ โปรแกรมเปิดบริการ socket SSL. 

$ SuSEconfig --module syslog-ng
$ rcsyslog restart
$ syslog-ng  <-ถ้าไม่ขึ้น error ก็ผ่านครับ.
หรือ
$ syslog-ng -d <- ดู debug

Configuration Apache2 (เครื่องเครื่อง mail_server server.)
$ vi /etc/apache2/httpd.conf
ErrorLog /var/log/apache2/error_log
ErrorLog syslog
LogLevel notice
CustomLog "|/bin/logger -p local1.info" combined
:wq! (บันทึก)
$ rcapache2 reload

Ref : http://www.devshed.com/c/a/Apache/Logging-in-Apache/4/

ตรวจสอบ Log ว่ามี client ติดต่อเข้ามายัง.
$ tail -f /var/log/messages
syslog-ng[5236]: AF_INET client connected from 192.16 8.1.11
แสดงว่ามีการติดต่อเข้ามาแล้ว.



สร้างไฟล์สำหรับ rotateใน  /etc/logrotate.d/
$ vi /etc/logrotate.d/logserver
#Rotate 90
/var/log/mail_server/*/*/squid_access.log
/var/log/mail_server/*/*/ssh_access.log
/var/log/mail_server/*/*/firewall.log
/var/log/mail_server/*/*/apache_access.log
/var/log/pattayapdc/*/*/squid_access.log
/var/log/pattayapdc/*/*/ssh_access.log
/var/log/pattayapdc/*/*/firewall.log
/var/log/pattayapdc/*/*/apache_access.log
/var/log/koratpdc/*/*/squid_access.log
/var/log/koratpdc/*/*/ssh_access.log
/var/log/koratpdc/*/*/firewall.log
/var/log/chaingmaipdc/*/*/squid_access.log
/var/log/chaingmaipdc/*/*/ssh_access.log
/var/log/chaingmaipdc/*/*/firewall.log
{
    compress
    dateext
    maxage 365
    rotate 90
    missingok
    notifempty
    size +4096k
    create 640 root root
    postrotate
        /etc/init.d/syslog reload
    endscript
}
:wq! (บันทึก)


ตั้งเวลาให้ทำการ ratate ด้วย crontab.

$ crontab -e
# logserver
59 23 * * * /usr/sbin/logrotate -f /etc/logrotate.d/logserver > /dev/null

สั่ง Logrotate ทําการ Reload เฉพาะ Configuration File (ถ้าต้องการทดสอบ)
$ logrotate -f /etc/logrotate.d/logserver

สร้าง Script ดู Log. (ในกรณีที่ไม่ได้ติดตั้ง mullitaill)
ตัวอย่าง : Script สำหรับดู log proxy (squid)
$ vi /logsquid-koratpdc
#!/bin/sh
ylog=$(date +%Y)
mlog=$(date +%m)
curelog=squid_access.log
hostlog=pattayapdc
tail -f /var/log/$hostlog/$ylog/$mlog/$curelog
$ chmod 700 /logsquid-koratpdc

รันคำสั่งสำหรับดู Log.
$ /logsquid-koratpdc

เข้ารหัสไฟล์ (Encryption Log files and md5sum):
สร้าง Directory สำหรับเก็บ Encrypt Logs
$ mkdir /var/log/backup
$ cd /var/log/backup
สร้าง Scripts Encryption
$ vi encrypt.sh
#!/bin/sh
## Script encryption log files. ##
mkdir $(date +%F)
cd $(date +%F)
pass="1234"
server1=mail_serverserver
server2=koratpdc
server3=chaingmaipdc
server4=pattayapdc
# Path files.
log_path1=/var/log/mail_server
log_path2=/var/log/koratpdc
log_path3=/var/log/chaingmaipdc
log_path4=/var/log/pattayapdc
# Create archive.
tar zcvf $server1.tar.gz $log_path1
tar zcvf $server2.tar.gz $log_path2
tar zcvf $server3.tar.gz $log_path3
tar zcvf $server4.tar.gz $log_path4
# Encryption files.
openssl des -in "$server1".tar.gz -k "$pass" -out "$server1".tar.gz.sec
openssl des -in "$server2".tar.gz -k "$pass" -out "$server2".tar.gz.sec
openssl des -in "$server3".tar.gz -k "$pass" -out "$server3".tar.gz.sec
openssl des -in "$server4".tar.gz -k "$pass" -out "$server4".tar.gz.sec
# Check sum.
md5sum "$server1".tar.gz.sec > MD5SUM-$server1
md5sum "$server2".tar.gz.sec > MD5SUM-$server2
md5sum "$server3".tar.gz.sec > MD5SUM-$server3
md5sum "$server4".tar.gz.sec > MD5SUM-$server4
# Delete archive.
rm *.tar.gz
echo "encrypt finish. "

:wq! (บันทึก)
$ chmod 700 encrypt.sh


ถอดรหัสไฟล์ (Decryption Log files):
$ vi decrypt.sh
#!/bin/sh
## Script encryption log files. ##
mkdir $(date +%F)
cd $(date +%F)
pass="1234"
server1=mail_serverserver
server2=koratpdc
server3=chaingmaipdc
server4=pattayapdc
# Decryption files.
openssl des -d -in "$server1".tar.gz.sec -k "$pass" -out "$server1".tar.gz
openssl des -d -in "$server2".tar.gz.sec -k "$pass" -out "$server2".tar.gz
openssl des -d -in "$server3".tar.gz.sec -k "$pass" -out "$server3".tar.gz
openssl des -d -in "$server4".tar.gz.sec -k "$pass" -out "$server4".tar.gz
# Check SUM.
md5sum -c MD5SUM-$server1 >> OUTPUT_MD5
md5sum -c MD5SUM-$server2 >> OUTPUT_MD5
md5sum -c MD5SUM-$server3 >> OUTPUT_MD5
md5sum -c MD5SUM-$server4 >> OUTPUT_MD5
# Extact files
tar zxvf $server1.tar.gz
tar zxvf $server2.tar.gz
tar zxvf $server3.tar.gz
tar zxvf $server4.tar.gz
# Delete archive.
rm *.tar.gz
echo "decrypt finish. "

:wq! (บันทึก)
$ chmod 700 decrypt.sh

ตรวจสอบ Log ไฟล์ว่ามีการแก้ใขหรือไม่ (Check sum):
$ cat OUTPUT_MD5
# ถ้า Log files อยู่ในสภาพเดิม :
pattayapdc.tar.gz.sec: OK

# ถ้า Log files มีการแก้ไข :
pattayapdc.tar.gz.sec: no properly formatted MD5 checksum lines found.
ตั้งเวลาให้ Scripts ทำงาน
#encryption log
0 0 * * 0 /var/log/backup/encrypt.sh 2>&1 > /dev/null

ติดตั้งโปรแกรมเพื่อดู Log ไฟล์ (Log  Monitoring by multitail):
$ wget http://www.vanheusden.com/multitail/multitail-5.2.2.tgz
$ tar xvf multitail-5.2.2.tgz
$ cd multitail-5.2.2
$ make install
$ make thanks

ตัวอย่างการใช้คำสั่ง
Show 5 logfiles while merging 2 and put them in 2 columns with only one in the left column:
$ multitail -s 2 -sn 1,3 /var/log/mail_server/2008/09/apache_access.log -I /var/log/mail_server/2008/09/pop3.log /var/log/pattayapdc/2008/09/squid_access.log /var/log/koratpdc/2008/09/squid_access.log /var/log/squid/access.log

Show 3 logfiles in 2 columns:
$ multitail -s 2  /var/log/mail_server/2008/09/smtp.log  /var/log/mail_server/2008/09/imap.log /var/log/mail_server/2008/09/pop3.log


แก้ไขให้เมล์ที่ส่งภายใน โดเมน (local to local) ให้เข้าqmail_server-scanner (Changing Your Tcp Rules):
$ /etc/tcprules.d/tcp.smtp
# adding the Qmail_serverQUEUE variables to 127.
127.:allow,RELAYCLIENT="",Qmail_serverQUEUE="/var/qmail_server/bin/qmail_server-scanner-queue.pl"
192.168.1.1:allow,BADMIMETYPE="",BADLOADERTYPE="M",CHKUSER_RCPTLIMIT="50",
CHKUSER_WRONGRCPTLIMIT="10",Qmail_serverQUEUE="/var/qmail_server/bin/qmail_server-scanner-queue.pl"

192.168.:allow,RELAYCLIENT="",Qmail_serverQUEUE="/var/qmail_server/bin/qmail_server-scanner-queue.pl"
:allow,BADMIMETYPE="",BADLOADERTYPE="M",CHKUSER_RCPTLIMIT="50",
CHKUSER_WRONGRCPTLIMIT="10",Qmail_serverQUEUE="/var/qmail_server/bin/qmail_server-scanner-queue.pl"

:wq! (บันทึก)

Rebuild cdb file:
$ qmail_serverctl cdb
Restart Qmail_server Server:
$ qmail_serverctl restart

ตรวจสอบ log (qmail_server-scanner): ที่เครื่อง Centralized Log Server
$ tail -f /var/log/mail_server


สำหรับ Client

Firewall Setting:
$ vi /etc/sysconfig/SuSEfirewall2
FW_CUSTOMRULES="/etc/sysconfig/scripts/SuSEfirewall2-custom" <-uncomment
#FW_CUSTOMRULES="" <-comment
:wq! (บันทึก)

$ rcSuSEfirewall2 restart
$ vi /etc/sysconfig/scripts/SuSEfirewall2-custom
#example: allow incoming multicast packets for any routing protocol
#iptables -A INPUT -j ACCEPT -d 224.0.0.0/24
#Syslog-ng
    iptables -t filter -A OUTPUT -p udp -s 192.168.1.13 --dport 514 -j ACCEPT

   true
}
:wq! (บันทึก)

Update Squid 2.5 to 2.6 (Version 2.5 ไม่สนับสนุน syslog)
$ rcsquid stop
$ rpm -Uvh squid-2.6.STABLE5-31.1.i586.rpm
 (created as /etc/squid/squid.conf.rpmnew)
 (rpm -Fvh ) -F : upgrade package(s) if already installed

$ vim /etc/squid/squid.conf
# comments
    #httpd_accel_host virtual
    #httpd_accel_port 80
    #httpd_accel_with_proxy on
    #httpd_accel_uses_host_header on



http_port 3128 transparent
##Additional line for Log Server
access_log syslog squid
access_log /var/log/squid/access.log squid

cache_dir ufs /var/cache/squid 2000 16 256
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log

:wq! (บันทึก)
$ rcsquid start

Config syslog-ng (Version 1.6.8)
$ vim /etc/syslog-ng/syslog-ng.conf
#options { long_hostnames(off); sync(0); perm(0640); stats(3600); };
options {
   sync (0);
   time_reopen (10);
   log_fifo_size (1000);
   long_hostnames (off);
   use_dns (no);
   use_fqdn (no);
   create_dirs (no);
   keep_hostname (yes);
};
source src {
        internal();
        unix-dgram("/dev/log");
        unix-dgram("/var/lib/dhcp/dev/log"); # for dhcp server, if you run service dhcp.
        unix-dgram("/var/lib/named/dev/log");
};
ให้พิมพ์เพิ่ม ต่อจากบรรทัดสุดท้าย
## LogServer additional by Sontaya Photibut ##
destination logserver {udp("192.168.1.13" port(514));};

#
# Squid log to Centralized Log Server:
#
filter f_squid { program("squid"); };
destination d_squid {
 file("/var/log/$HOST/$YEAR/$MONTH/squid.$YEAR-$MONTH-$DAY"
 owner(root) group(root) perm(0600)
 create_dirs(yes) dir_perm(0700));
};
log { source(src); filter(f_squid); destination(logserver); };

#
# SSH log to Centralized Log Server:
#
filter f_ssh { program("sshd") and facility(auth, authpriv); };
destination d_ssh {
  file("/var/log/$HOST/$YEAR/$MONTH/ssh.$YEAR-$MONTH-$DAY"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(src); filter(f_ssh); destination(logserver); };

#
# Firewall (iptables) log to Centralized Log Server:
#
destination d_firewall {
  file("/var/log/$HOST/$YEAR/$MONTH/firewall.$YEAR-$MONTH-$DAY"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(src); filter(f_iptables); destination(logserver); };

#
# Apache2 (httpd) log to Centralized Log Server:
#
filter f_apache { program("apache") or match ("logger:"); };
destination d_apache {
file("/var/log/$HOST/$YEAR/$MONTH/apache.$YEAR-$MONTH-$DAY"
owner(root) group(root) perm(0600)
create_dirs(yes) dir_perm(0700));
};
log { source(src); filter(f_apache); destination(logserver); };

#
# POP3  Log Service.
#
filter f_pop3 { match("vpopmail|pop3"); };
destination d_pop3 {
  file("/var/log/$HOST/$YEAR/$MONTH/pop3.log"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(src); filter(f_pop3); destination(logserver); };
#
# IMAP Log  Service.
#
filter f_imap { match("imap"); };
destination d_imap {
  file("/var/log/$HOST/$YEAR/$MONTH/imap.log"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(src); filter(f_imap); destination(logserver); };
#
# SMTP or Sendmail Log Service.
#
filter f_smtp { match("qmail-scanner"); };
destination d_smtp {
  file("/var/log/$HOST/$YEAR/$MONTH/smtp.log"
  owner(root) group(root) perm(0600)
  create_dirs(yes) dir_perm(0700));
};
log { source(src); filter(f_smtp); destination(logserver); };

:wq (บันทึก)

$ SuSEconfig --module syslog-ng
$ rcsyslog restart

แก้ไข httpd.conf
$ vi /etc/apache2/httpd.conf
ErrorLog /var/log/apache2/error_log
## Add line for syslog-ng
ErrorLog syslog
LogLevel notice
CustomLog "|/bin/logger -p local1.info" combined

:wq! (บันทึก)
$ rcapache2 restart


 


Comments (0)Add Comment

Write comment

security code
Write the displayed characters


busy
 

SUSE Linux Enterprise Cool Solutions

  • Why You'll Want To Be At ATT Live 2012

    Memories of ATT Live 2010 are still fresh in my mind. It was a great event at a great location, The M in Las Vegas, NV. Novell customers and partners alike told us they were very happy with it. The Novell Training team was also extremely pleased with how it turned out. The venue was great, the location was perfect, and let's not forget how effective and beneficial the training was. I am excited to be part of the team again that is putting together ATT Live 2012. Due to the Attachmate acquisition, the heritage Novell/SUSE Training team is now also responsible for NetIQ training, so this is an exciting time for us and even greater opportunity than ever before for you.

    The main reason you'll want to attend ATT Live 2012 is: you get 4 days of intense, hands-on training geared specifically for people like you--system administrators, network engineers and IT specialists--who actually do the job of administering Novell, SUSE and NetIQ products. You get the real world, day-to-day administration, usability, troubleshooting, and tips & tricks training you need to succeed on the job.

    I blogged a little bit about ATT Live a couple months ago but the planning for the event is more complete now and there's more detailed information to share today that I wanted make you aware of. In addition to the general facts that ATT Live 2012 will be held May 15-18 at The M Resort Spa and Casino in Las Vegas, NV, I wanted to point out several exciting things you'll want to look at today:

    This year we are offering nearly 80 unique 2- and 4-hour sessions with:

    • 6 tracks dedicated to the Novell products ZEN, OES and GW
    • 3 NetIQ tracks focused on ISM, Sentinel, and legacy NetIQ products
    • 3 SUSE tracks focused on SLES administration, usability and troubleshooting

    At ATT Live 2012 you'll be rubbing shoulders with product managers, subject matter experts, and front & backline support engineers who will be helping the Training team to deliver more learning tracks and unique sessions than ever before.

    Once you're at the M Resort you'll find this to be a very affordable training event. The conference room rate is only $120 per night. The food is great (The M has the best buffet in Las Vegas) and breakfast and lunch all 4 days are covered by your conference registration. And you'll only be 10 minutes from the airport and from The Strip with free shuttles to and from both destinations.

    If you have questions or suggestions regarding ATT Live 2012, you can check the website or email the team at ATTLive@novell.com.

    As for me, I'll be blogging more about ATT Live 2012 in the weeks to come to provide more detailed information about the content of the sessions themselves. This is, after all, a technical training conference and it's the technical stuff that matters most to you so I'll be diving into that so you'll have more of an idea about what you'll be getting in return for your training investment.

    Please follow Novell, SUSE, and NetIQ Training on:
    http://twitter.com/novell_training
    http://www.facebook.com/NovellTraining

  • SUSE Linux Enterprise Server now available on Dell Cloud

    Good news for Dell customers. SUSE Linux Enterprise Server is now available to customers through Dell's new public cloud offering, Dell Cloud with VMware vCloud® Datacenter Service.

    SUSE Linux Enterprise Server is the first Linux operating system available to customers through the Dell Cloud. Now, Dell customers can efficiently run a wide range of ISV applications, on a pay-per-use basis, with maximum performance, while receiving streamlined support from Dell and SUSE.

    Learn more.

  • Relocating non-persistent parts of Firefox profile.

    Whilst the previous Cool Solution only redirected urlclassifer3.sqlite, this method redirected urlclassifer3.sqlite, Cache, OfflineCache and the fastloader files XUL.mfasl XPC.mfasl. This method also uses environment variables rather than creating a symbolic link, so it's cleaner.

    I figured out this solution after reading a bug report at https://bugzilla.mozilla.org/show_bug.cgi?id=239254

    The trick is to launch Firefox with both $XRE_PROFILE_PATH set to the location of the profile that's being used and $XRE_PROFILE_LOCAL_PATH set to where you want Cache, urlclassifer3.sqlite etc to be. Like the previous Cool Solution, a wrapper script called firefox in /usr/local/bin takes care of that. Also like the previous Cool Solution, this wrapper script makes use of another script findfirefoxprofilepath, also attached, which works out the location of the user's Firefox profile (it's output is set as the value of $XRE_PROFILE_PATH). The firefox script expects the findfirefoxprofilepath script to be in /usr/local/sbin.

    If $XDG_CACHE_HOME is set, the firefox script sets $XRE_PROFILE_LOCAL_PATH to somewhere in there. (It will always use the same location so the files will persist across sessions, assuming they're not deleted by something else.) If $XDG_CACHE_HOME is not set then a new directory will be created each time using mktemp.

    I've had this script in use in a production environment for about five months with no apparent problems and I've tested it with newer versions of Firefox than are currently in SLED. Hopefully Firefox will one day support the XDG directory specification and then a wrapper script such as this will not be necessary, you can just set $XDG_CACHE_HOME and be done with it. (I already set $XDG_CACHE_HOME to somewhere outside the user's home directory, hence why this wrapper scripts makes use of it if it's set.) The bugzilla entries for such support were raised some years ago though so I'm not expecting such support to appear any time soon.

    AttachmentSize
    firefox_wrapper_scripts.tbz2.16 KB
  • Ever search for KB TIDs/Articles? Take this survey and you could win a $20 Amazon gift card

    Do you ever look up TIDS/Articles in the Knowledgebase? They're making some changes to the way the Knowledgebase search process works, and they want to get some input from you. Take a VERY short survey, and we'll enter you in a drawing for three $20 Amazon Gift Cards.

    Don't be shy!

    https://www.surveymonkey.com/s/Knowledgebase-search

  • How to set up AutoAdminLogon with the Novell Client for Linux on SLE 11

    Setup Process:

    Step #1 - Configure the desktop to automatically login.

    1. Launch YaST or YaST2
    2. Click on System-->Sysconfig Editor-->Desktop-->Displaymanager-->displaymanager_autologin
    3. Enter the username used in logging into the desktop.
    4.  
      Now after the workstation is rebooted, the workstation should automatically do a local login to the desktop.

    Step #2 - Configure the Novell Client for Linux to automatically login.

    Option A: Use a script

    • Edit and append the following lines to the /home/<username>/.profile.
    NOTE: Lines in bold (found at the beginning) should be changed with your specific information
    #===================================
     
    #USER="<mylocaluser>"
    USER="<username>"
     
    #SERVER="<myserver.novell.com>"
    SERVER="<dns or IP>"
     
    #VOLUME="SYS"
    VOLUME="<volume>"
     
    #EDIR_USER="<admin>"
    EDIR_USER="<edir user>"
     
    #EDIR_PASWORD="<novell>"
    EDIR_PASWORD="<password>"
     
    #EDIR_USER_CONTEXT="<ou=users,o=novell>"
    EDIR_USER_CONTEXT="<edir context for user>"
     
    #MAPLOCATION="</home/jmeldrum/Desktop/mymap>"
    MAPLOCATION="<map location and name>"
     
    
    loggedIn="$(nwconnections | sed -n "/[0-9]/p")"
     
    if [ $(whoami) == "$USER" ]; then
            if [ -z "$loggedIn" ]; then
                    echo "=========`date` ================" >> /tmp/mylogin.log
                    /opt/novell/ncl/bin/nwmap -d $MAPLOCATION -s SERVER -v $VOLUME -u $EDIR_USER -p $EDIR_PASWORD-c $EDIR_USER_CONTEXT 2&1 >> /tmp/mylogin.log
            fi
    else
            echo "$(whoami) does not match user $USER" >> /tmp/mylogin.log
    fi
    #===================================
    

    Option B: Setup Integrated Login

    AutoAdminLogon is now setup.