Bài đăng

Đang hiển thị bài đăng từ Tháng 7, 2014

How to find know the Base DN and Bind DN for Active Directory

When you config the Xendesktop, VMware view or other related to active Directory,you may need to know Base DN and Bind DN. Open the command prompt  on winodws2003 AD server and type”dsquery user” C:\>dsquery user “CN=Administrator,CN=Users,DC=wad,DC=com” “CN=Guest,CN=Users,DC=wad,DC=com” “CN=SUPPORT_388945a0,CN=Users,DC=wad,DC=com” “CN=krbtgt,CN=Users,DC=wad,DC=com” “CN=root,CN=Users,DC=wad,DC=com” “CN=IUSR_WICHEU-TOL55S55,CN=Users,DC=wad,DC=com” “CN=IWAM_WICHEU-TOL55S55,CN=Users,DC=wad,DC=com” “CN=vdi1,CN=Users,DC=wad,DC=com” Find special user, you can type”dsquery user -name xxx*” C:\>dsquery user -name vd* “CN=vdi1,CN=Users,DC=wad,DC=com” Also this command are query group too!

CONFIGURATION PROCESS OF CAS with LDAP

About CAS: The CAS protocol involves at least three parties: a  client  web browser, the web  application  requesting authentication, and the  CAS server . It may also involve a  back-end service , such as a database server, that does not have its own HTTP interface but communicates with a web application. When the client visits an application desiring to authenticate to it, the application redirects it to CAS. CAS validates the client's authenticity, usually by checking a username and password against a database (such as  Kerberos  or  Active Directory ). If the authentication succeeds, CAS returns the client to the application, passing along a  security ticket . The application then validates the ticket by contacting CAS over a secure connection and providing its own service identifier and the ticket. CAS then gives the application trusted information about whether a particular user has successfully authenticated. CAS allows multi-tier authentication via  proxy

[Zabbix Alert] Configure msmtp to work with gmail on linux

Hình ảnh
Zabbix integrated Email media facility is restricted to basic SMTP protocol. It does not support advanced SMTP capabilities such as authentication or encrypted communication with  TLS Zabbix notification system can be extended with external programs. This solution is based on  msmtp  command line utility that integrates advanced SMTP capabilities. Email content customization Zabbix integrated Email media facility can only send simple text emails. With an external script, it is possible to add custom email headers. It allows to use HTML formatted messages or change message priority. Installation Prerequisites msmtp must be installed. On CentOS: yum install msmtp msmtp media script zext_msmtp.sh  script ( latest version ) should be installed in alert scripts directory on Zabbix server. This directory is defined in zabbix_server.conf by AlertScriptsPath parameter. Default value is: # vi /etc/zabbix/zabbix_server.conf AlertScriptsPath=/etc/zabbix/alert.d/ # /etc/in

How to resize LVM logical volumes with ext4 as filesystem

Ever been in the situation where you needed to save some important files to a server and your greeted with “Not enough space left on device”-kind messages? No? Well, as that happened too often too me for my liking, I decided to do it right this time when I set up my home server and use logical volume manager (LVM) straight from the start. So basically, all I had to do was to shrink a filesystem that had free space in it and its partition (logical volume (LV) to be precisely) afterwards and then to resize the logical volume/filesystem where I needed the space. As all the necessary tools are available normally on a system with LVM support, I could dive right in:   # Unmount the filesystem and check its' LV umount /mnt/foo e2fsck -f /dev/mapper/vg0-foo   # Shrink ext4 and then the LV to the desired size resize2fs -p /dev/mapper/vg0-foo 40G lvreduce -L 40G /dev/mapper/vg0-foo   # Before continuing, run e2fsck. If it bails because the partition # i

How to resize or expand LVM partitions

A few week ago, I installed FC6 on my laptop and my slash (/) partition started to run out of space. So I decided that I would shrink my big partition and expand my / partition. Fortunately, I installed FC6 using LVM2 (Logical Volume Manager) which makes it very easy to resize partitions without even rebooting. Here is how I did. My partition was like this: Filesystem                  1K-blocks    Used    Available    Use%    Mounted on /dev/mapper/VolGroup00-LogVol00    7935392    6773500    752292    91%    / /dev/sda5                    497829      20904    451223      5%      /boot tmpfs                        1037084      0       1037084     0%      /dev/shm /dev/mapper/VolGroup00-LogVol01    70877776    14988144    51045372    23%    /home My / partition is about 8 Gb and my /home partition is about 71 Gb. For /home, I did: umount /home or umount -l /home e2fsck -f /dev/VolGroup00/LogVol01 resize2fs /dev/VolGroup00/LogVol01 69G lvreduce -L-2G /dev/VolGroup00/Lo

How to Increase the size of a Linux LVM by expanding the virtual machine disk

Hình ảnh
This post will cover how to increase the disk space for a VMware virtual machine running Linux that is using logical volume manager (LVM). Firstly we will be increasing the size of the actual disk on the VMware virtual machine, so at the hardware level – this is the VM’s .vmdk file. Once this is complete we will get into the virtual machine and make the necessary changes through the operating system in order to take advantage of the additional space that has been provided by the hard drive being extended. This will involve creating a new partition with the new space, expanding the volume group and logical group, then finally resizing the file system. As there are a number of different ways to increase disk space I have also posted some different methods here: Use GParted to increase disk size of a Linux native partition – In this article the virtual disk is expanded, however there is no LVM here just a Linux native partition that is expanded with the GParted live C

[Zabbix] Fping can only be run by or not supported

+ Install fping + Check fping path # whereis fping  fping: /usr/sbin/fping /usr/share/man/man8/fping.8.gz + Edit file # vi /etc/zabbix/zabbix_server.conf  Change: FpingLocation=/usr/sbin/fping + Chown fping # chown root:zabbix /usr/sbin/fping # chmod 710 /usr/sbin/fping # chmod ug+s /usr/sbin/fping + Result [root@localhost ~]# ll /usr/sbin/fping -rws--s--- 1 root zabbix 27824 May 19  2010 /usr/sbin/fping

Home directory websites using vhost

Hình ảnh
Needs / Issues Develop websites located inside home directory; No need for special (root/web server) privileges to develop sites; Websites are referenced with DNS, not aliases. Audience Administrator / Power user; Developer user. Initial Setting Apache 2.2 (or newer). Steps In a shell session (as user): Create your "root" directory mkdir ~/public_html This is where the site will be hosted.   Make sure the Apache user can access that root directory: namei -l ~/public_html All directories in the output list should be at least executable by the Apache user. In a shell session (as root): Enable VHosts in Apache's configuration: vi /etc/httpd/conf/httpd.conf Uncomment the following line: NameVirtualHost *:80   Create an Apache configuration file for your website: vi /etc/httpd/conf.d/ YOUR_WEBSITE .conf Have it contain: <VirtualHost *:80>   ServerName YOUR_WEBSITE .localhost

Installing Samba4 As An Active Directory Domain Controller On CentOS 6

With the last version of samba 4 comes with Active directory logon and administration protocols, including typical active directory support and full interoperability with Microsoft Active Directory servers. This is possible with the combination of a LDAP directory, kerberos authentication, BIND DNS server and the remote procedure calls RPC. When running as an Active Directory DC, you only need to run 'samba' (not smbd/nmbd/winbindd), as the required services are co-coordinated by this master binary. The tool to administer the Active Directory services is called 'samba-tool'. I have a CentOS 6 x86_64 Minimal install. This post covers the initial installation and configuration of samba 4 as Active Directory domain controller on Centos 6 using BIND 9 as DNS backend and NTP server used by the clients. 1) Disable SELinux [root@ad ~]# vi /etc/sysconfig/selinux              selinux=disabled  2) Install the pre-requisites (or dependencies) for Samba 4 ins

Monitor & Record all Shell Commands & Send Logs to Centralized RSyslog Server

In this post I will show how to record all the users activity i.e. shell commands that are executed and will send that logs to the centralized log server. In this demo I have a couple of CentOS 6.3 x86_64 machines with minimal installation. 1) Rsyslog is installed by default on CentOS machines, incase its not installed, install the Rsyslog package on both Client and Server. [root@server ~]# yum install rsyslog -y [root@client ~]# yum install rsyslog -y     2) Edit the /etc/bashrc to record the shell commands that are executed [root@client ~]# vim /etc/bashrc Add this line to the end of file remoteip=$(who am i | awk '{print $5}' | sed "s/[()]//g" ) export PROMPT_COMMAND='RETRN_VAL=$?;logger -p local3.debug "$(whoami)  $remoteip  [$$]: $(history 1 | sed "s/^[ ]*[0-9]\+[ ]*//" ) [$RETRN_VAL]"'   3) Configure the Rsyslog server to capture the local3 to a log file [root@client ~]# vim /etc/rsyslog.conf local3.*                /v

How to Record All Incoming & Outgoing Mails To Seperate Email Addresses In Postfix

In this post I am going to explain how to record/archive all the incoming and outgoing emails from a postfix system to two different email addresses. I have a CentOS 6.3 x86_64 Minimal install system. In CentOS 6, postfix is installed and will be running by default. Pre-requesites: 1) Working DNS Server : Incase you dont know how to configure, please look at this link to configure BIND DNS Server http://easylinuxtutorials.blogspot.in/2011/11/setting-up-dns-server-in-rhel-6.html 2) Postfix must be installed. Incase its not installed then [root@mail ~]# yum install postfix -y Edit the Postfix Configuration file [root@mail ~] # vim /etc/postfix/main.cf myhostname = mail.example.com mydomain = example.com myorigin = $mydomain inet_interfaces = $myhostname, localhost inet_protocols = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks = 192.168.124.0/24, 127.0.0.0/8 mynetworks_style = subnet sender_bcc_maps = hash:/etc/postfix/outgoing