Latest Updates: LDAP RSS

  • bass

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

    bass 00:50 on 12/11/2009 | 0 Permalink | Reply
    Tags: desktop, LDAP, 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

    Quota in Ldap

    bass 23:41 on 12/10/2009 | 0 Permalink | Reply
    Tags: LDAP, quota

    ใช้

    > id username

    ดู userid ก่อน (LDAP น่าจะพอบอกออกมาได้) แล้วตั้ง quota ตาม userid เลย
    ใช้

    > setquota -u userid   xxx yyy zzz ggg

    โดยคุณ sf_alpha

    http://www.thaiadmin.org/board/index.php?topic=12724.0

     
  • bass

    VSFTP + Ldap Config

    bass 23:39 on 12/10/2009 | 0 Permalink | Reply
    Tags: LDAP, vsftpd

    เป็นที่ทราบกันดีว่า vsftpd คือ ftp server ที่มีมากับ Linux หลายๆค่ายเหตุเพราะมีความเสถียร, รวดเร็ว และ ปลอดภัย ดังนั้นจึงมีผู้นิยมนำมาใช้เป็น ftp server กันอย่างแพร่หลาย vsftpd ตัวนี้โดยทั่วไปแล้วจะ support การ authentication กับ user ระบบ แต่ในบทความนี้จะกล่าวถึงวิธีการที่จะทำให้ vsftpd สามารถที่จะ authenticate ผ่าน LDAP server.

    การแก้ไขค่า configure ที่จะทำให้ vsftpd ตัวนี้สามารทำการ authenticate กับ LDAP ได้จะต้องมีตัวกลางในการ authenticate และพระเอกของเราก็คือ PAM หรือ Pluggable Authentication Modules นั้นเอง

    วิธีการ Configure จะแก้ไขที่ไฟล์เดียวนั้นก็คือไฟล์ /etc/pam.d/vsftpd โดยใช้คำสั่ง

    #vi /etc/pam.d/vsftpdจากนั้นทำการแก้ไขให้ค่าต่างๆเหมือนกับค่าด้านล่างนี้
    
    #%PAM-1.0
    
    #auth       required    pam_listfile.so item=user sense=deny
                            file=/etc/vsftpd.ftpusers onerr=succeed
    
    #auth       required    pam_stack.so service=system-auth
    
    #auth       required    pam_shells.so
    
    #account    required    pam_stack.so service=system-auth
    
    #session    required    pam_stack.so service=system-auth
    
    #auth       sufficient   /lib/security/$ISA/pam_ldap.so
    
    auth       required     /lib/security/$ISA/pam_unix.so
    
    account    sufficient   /lib/security/$ISA/pam_ldap.so
    
    account    required     /lib/security/$ISA/pam_unix.so
    
    password   sufficient   /lib/security/$ISA/pam_ldap.so
    
    password   required     /lib/security/$ISA/pam_unix.so

    เมื่อทำการแก้ไขเสร็จเรียบร้อยแล้ว ก็ restart service โดยใช้คำสั่ง

    #service vsftpd restart
    
    
    ที่มา http://www.ezylinux.com/ftp/configure-vsftpd-uses-ldap-for-authentication/
     
  • bass

    bass 14:54 on 10/28/2009 | 0 Permalink | Reply
    Tags: , , ftp, LDAP, , samba

    LDAP สำหรับ การจัดการบริหารองค์กร Samba + Radius + Authentication + FTP + Mail ไปได้ครบทุกอย่าง = BSoltution For Office Managment
    เดียว จะมาเขียนรายละเอียดต่อ

     
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