Updates from กุมภาพันธ์, 2010

  • bass

    How to restrict users to SFTP only instead of SSH

    bass 21:50 on 02/15/2010 | 0 Permalink | Reply
    Tags: allow, scp, sftp, ssh

    Sometimes you want to have users, that have access to files on your server, but don’t want them to be able to log in and execute commands on your server.

    This is done quite easily.

    Add user as usually and assign him a password. Then run the following command (replace the ‘username’ with real user name):

    root@host # usermod -s /usr/lib/sftp-server username

    This changes user’s shell to sftp-server.

    The last step for this to work is to add ‘/usr/lib/sftp-server’ to /etc/shells to make it a valid shell, eg. like this:

    root@host # echo '/usr/lib/stfp-server' >> /etc/shells

    There. Now you’ve setup a user who can only access your server with SFTP.

    Refer : http://www.debian-administration.org/articles/94

     
  • bass

    ReView BenQ nScreen i91 ลง Ubuntu 9.04

    bass 23:48 on 01/03/2010 | 0 Permalink | Reply
    Tags: benq, i91, , webcam

    Link : http://tonypink.exteen.com/20090707/review-benq-nscreen-i91-ubuntu-9-04

    ReView BenQ nScreen i91 ลง Ubuntu 9.04

    พอดีที่ Office ได้สั่งเจ้าตัวนี้ มาเล่น  20 กว่าตัว และ จะสั่งมาอีกเรื่อยๆ เห็น ว่าพรุ่งนี้ จะเข้ามาอีก 20 – 30 ตัว เพื่อให้ เด็ก พิมพ์งาน

    ปัญหาที่เจอตอนนี้

    ได้ลง ubuntu 9.10 และ โมทุกอย่างแล้ว แต่มีปัญหากับระบบคือ

    Webcam มีปัญหา กับ Wireless

    และ Flash Plugin มีปัญหากับ Webcam ภาพแตก แต่พอมารัน บน java ดันได้ เซ็ง

    ตอนนี้ กำลังจะ Down ลงไปเป็น 9.04 ดูว่าจะมีปัญหาหรือ ป่าวโดยจะใช้ 9.04 amd64

    ReView Hardware: http://www.notebookspec.com/2008/modules.php?name=Content&pa=showpage&pid=2068&page=1

     
  • bass

    How to Replace the Volume Control in Ubuntu 9.04

    bass 23:42 on 01/03/2010 | 0 Permalink | Reply
    Tags: gnome, , volume

    I have recently heard someone cursing Canonical for not implementing the highly acclaimed PulseAudio volume control into the new Ubuntu 9.04 (Jaunty Jackalope) operating system, a function that exists in the newly released Mandriva 2009.1 (Spring) distribution. First, let me tell you what the PulseAudio volume control can offer. Except for the fact it is much better than the old ALSA or OSS sound servers, it will offer you the ability to individually control the volume of each running application that uses the sound server, including web-based ones, such as flash players (YouTube, Google Videos, etc). So, as usual, I thought this would be an easy-to-achieve task and I’ve created the following guide, which will teach you how to replace the default volume control in Ubuntu 9.04 with PulseAudio’s smarter one, in only five minutes!

    This is how the volume control looks like in a default installation of Ubuntu 9.04 (Jaunty Jackalope)…

    Review image

    The default playback sound server is set to ALSA…

    Review image

    Even if you switch to PulseAudio, you won’t have the “Applications” tab we talked about at the beginning of the article…

    Review image

    Therefore, you need to remove the default volume control applet. Right click on it and select the “Remove From Panel” option…

    Review image

    Now, go to System -> Administration -> Synaptic Package Manager

    Review image

    Input your password if asked. When Synaptic is loaded, type pulse in the “Quick search” box. When the results are displayed, left click on the box in front of the gnome-volume-control-pulse entry and select the “Mark for Installation” option…

    Review image

    Click the “Mark” button when asked and click the “Apply” button. When the Summary window appears click the “Apply” button to start the installation…

    Review image

    Wait for the package to be installed…

    Review image

    Close Synaptic and log out! Log back in and you will notice that you have a new volume control…

    Review image

    … one that offers you the ability to individually control the volume of each application that uses the sound server.

    Review image

    Refer : http://news.softpedia.com/news/How-to-Replace-the-Volume-Control-in-Ubuntu-9-04-with-the-PulseAudio-One-112786.shtml

     
  • bass

    IPSET Installation With Compile For iptables

    bass 12:45 on 01/01/2010 | 0 Permalink | Reply
    Tags: , , , ipset,

    The installation requires the following steps

    it is assumed that you have got the kernel source tree, configured and at least the modules compiled
    donwload and unpack the source
    run KERNEL_DIR= make to compile the userspace tool and the kernel modules
    run KERNEL_DIR= make install to install the ipset userspace tool and the kernel modules
    In order to use to the set match and SET target
    you need iptables 1.4.4 (or above), or
    due to the ipset protocol change, you have to recompile iptables before 1.4.4 to get ipset 3.0 (or above) supported:
    Copy the file kernel/include/linux/netfilter_ipv4/ip_set.h from the source tree of ipset-3.9 to include/linux/netfilter_ipv4 in the source of iptables
    Recompile iptables
    and ready!

    Refer : http://ipset.netfilter.org/install.html

     
  • bass

    Nero to ISO On Debian or Ubuntu

    bass 09:40 on 12/18/2009 | 0 Permalink | Reply

    Debian
    apt-get install nrg2iso

    Ubuntu
    sudo apt-get install nrg2iso

    nrg2iso image.nrg image.iso

    แค่นี้ก็จบแล้ว 555+…

     
  • bass

    Ubuntu 8.04 Hardy LDAP Client เอาไว้ทดลอง

    bass 00:50 on 12/11/2009 | 0 Permalink | Reply
    Tags: desktop, , ldap client,

    Ubuntu 7.10 was a nightmare when it came to setting up ldap, but 8.04 improves this process quite a bit.

    We are going to set up a Hardy client on a desktop machine, which involves using NFS (for /home) and allowing all desktop users to do desktop tasks.

    apt-get install libpam-ldap libnss-ldap nss-updatedb libnss-db nfs-common nscd

    Answer the questions; unlike Debian they should actually be put in the configuration file.

    Make sure to transfer over your certifiate if you use SSL. I like to use /etc/ldap/ssl

    Edit /etc/ldap.conf (which both libnss and libpam use).

    host 192.168.1.1
    base dc=example,dc=com

    #This is important! Don’t use ldap:///192.168.1.1
    uri ldap://example.com/
    ldap_version 3
    rootbinddn cn=admin,dc=example,dc=com
    port 389
    bind_policy soft
    pam_password crypt
    ssl start_tls
    tls_checkpeer no
    tls_cacertfile /etc/ldap/ssl/cert.pem
    nss_initgroups_ignoreusers avahi,avahi-autoipd,backup,bin,daemon,dhcp,games,gdm,gnats,haldaemon,hplip,irc,klog,libuuid,list,lp,mail,man,messagebus,news,polkituser,proxy,pulse,root,sync,sys,syslog,uucp,www-data

    Now edit /etc/ldap/ldap.conf

    BASE    dc=example,dc=com
    URI    ldap://example.com
    TLS_CACERT /etc/ldap/ssl/cert.pem
    TLS_REQCERT never

    /etc/pam.d/common-account

    account    sufficient   pam_ldap.so
    account    required     pam_unix.so

    /etc/pam.d/common-auth

    auth       sufficient   pam_ldap.so
    auth       required     pam_unix.so nullok_secure use_first_pass

    /etc/pam.d/common-password

    password   sufficient   pam_ldap.so
    password   required     pam_unix.so nullok obscure min=4 max=8 md5

    /etc/pam.d/common-session

    session    required     pam_unix.so
    session    required     pam_mkhomedir.so skel=/etc/skel/
    session    optional     pam_ldap.so

    /etc/nsswitch.conf

    passwd: files ldap

    group: files ldap

    shadow: files ldap

    hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
    networks:       files

    protocols:      db files
    services:       db files
    ethers:         db files
    rpc:            db files

    Now we want to make sure users are assigned to the correct groups when they log in, so add the following to /etc/security/groups.conf

    gdm;*;*;Al0000-9000;floppy,audio,cdrom,video,plugdev,scanner

    Hal does not recognize this, however, so delete the following entries from /etc/dbus-1/system.d/hal.conf

    <deny send_interface=”org.freedesktop.Hal.Device.Volume”/>
    <deny send_interface=”org.freedesktop.Hal.Device.Volume.Crypto”/>

    We need to edit /etc/pam.d/gdm for the groups.conf file to take effect, so add the following

    auth optional pam_group.so

    As root, run

    nss_updatedb ldap

    To mount /home over NFS, add the following to /etc/fstab

    192.168.1.1:/home       /home   nfs defaults 0 0

    Refer : http://linuxadministration.us/2008/05/17/ubuntu-804-hardy-ldap-client/

     
  • bass

    แปลงร่าง Ubuntu to MacOSX

    bass 21:29 on 12/03/2009 | 0 Permalink | Reply

    http://maketecheasier.com/turn-your-ubuntu-hardy-to-mac-osx-leopard/2008/07/23

    เพราะเหตุ คือ NB ใช้ MacOSX แต่ PC กำลังจะเปลี่ยนเป็น Ubuntu ก็เลย ทำให้เหมือนกันซะเลย เท่ ไปอีกแบบ 555+….

     
  • bass

    Change Splash Screen on Ubuntu

    bass 20:59 on 12/03/2009 | 0 Permalink | Reply
    Tags: splash screen,

    If you are trying to change the login screen (GDM):
    Open System –> Administration –> Login Window

    If you are trying to change the login splash screen, you’ll need to open terminal and type:

    sudo apt-get install gnome-splashscreen-manager

    Open: System –> Preferences –> Splash Screen
    Choose the Splash Screen you want to use and click activate.
    You can download splash screens at gnome-look.org

     
  • bass

    How to: install .net framework 2.0 in ubuntu using wine

    bass 14:43 on 12/03/2009 | 0 Permalink | Reply
    Tags: dotnet2.0, , wine

    1- set Windows 2000 as your default app in wine config.

    2- In teminal enter these lines one by one:
    Code:

    wget http://kegel.com/wine/winetricks

    Code:

    sh winetricks corefonts dotnet20

    Code:

    sh winetricks fakeie6

    *- If you got an error about c://windows/ does not exist try to mount your drives
    (This is general to all app. if you installed fake windows file in another drive)

    This is for shark so that he does not ask me again every time he installs it

     
  • bass

    Ubuntu ใส่ไอคอนธงชาติเปลี่ยนภาษาให้คีย์บอร์ด

    bass 12:44 on 12/03/2009 | 0 Permalink | Reply
    Tags:

    ปรกติเวลาสลับคีย์บอร์ดเปลี่ยนภาษาแล้ว บางทีก็ไม่รู้ว่ามันเป็นภาษาอะไรอยู่ น่ารำคาญ
    คลิกขวา add to panel ใส่ keyboard indicator ก็ได้มาเป็น text ภาษาไทยเป็น
    THA ภาษาอังกฤษเป็น USA

    ดูแล้วไม่ชอบใจ น่าเป็นไอคอนที่มันดูดีๆหน่อย ลองเปลี่ยนมันให้เป็นรูปธงชาติ น่าจะเข้าท่า

    วิธีเปลี่ยน (อันนี้ทำใน Gutsy นะครับ)

    1.sytem–preferences–main menu–system tool

    ติ๊ก configuration editor แล้วมันจะไปอยู่ใน Application—system tool

    บางคนอาจจะเรียกขึ้นจากเทอร์มินัลก็ได้ แล้วแต่ถนัด

    2.หารูปธงมา หาง่ายๆจาก wiki พิมพ์ในกูเกิ้ลก็ได้ svg wiki flag …ชื่อประเทศ

    3.ได้รูปธงมา เปิด gimp อีดิตธง โดย scale ภาพลงมาให้ความกว้าง 64 px ส่วนสูงปรับอัตโนมัติ
    เซฟเป็น us.png ธงไทยก็ th.png

    เท่าที่ลองมา ขนาด 48px ก็โอเค แต่ถ้ายังใหญ่ไป ก็ย่อธงลงมาอีก

    4. sudo nautilus เอารูปธงไปไว้ใน /usr/share/pixmaps
    หรือใส่ใน /home แล้ว veiw ให้ show hidden files
    เปิดโฟลเดอร์ .icons โดยเพิ่มโฟลเดอร์ flags เข้าไปก็ได้ครับ เอารูปธงใส่ไว้ในนั้น

    5.ไปที่ application—system tool—configuration editor–desktop—gnome—peripheral—keyboard—indicator
    แล้วติ๊ก showflag

    เสร็จ

    ไอคอนอาจจะเล็กไป พอรีสตาร์ตเครื่องน่าจะกลับมาพอดีๆ และบางกรณีคีย์บอร์ดอาจรวน ให้เอาออกจาก panel
    ลบคีย์บอร์ดเลย์เอาท์ แล้วใส่ใหม่ แอด พาเนลใหม่

    โชคดีครับ
    แล้วใส่เข้าไปใหม่

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel