Παρασκευή 14 Φεβρουαρίου 2020

FSMO roles

Microsoft split the responsibilities of a Domain Controller into 5 separate roles that together make a full Active Directory system.

The 5 FSMO roles are:

a) Schema Master
b) Domain naming Master
c) Infrastructure Master
d) Relative ID (RID) Master
e) PDC Emulator

What do They do?

a) Schema Master FSMO Role:  The schema master domain controller controls all updates and modifications to the schema. Once the Schema update is complete, it is replicated from the schema master to all other DCs in the directory. To update the schema of a forest, you must have access to the schema master. There can be only one schema master in the whole forest.

b) Domain Naming Master FSMO Role: The domain naming master FSMO role holder is the DC responsible for making changes to the forest-wide domain name space of the directory. This DC is the only one that can add or remove a domain from the directory. It can also add or remove cross references to domains in external directories. There can be only one domain naming master in the whole forest.

c) Infrastructure FSMO Role: When an object in one domain is referenced by another object in another domain, it represents the reference by the GUID, the SID (for references to security principals), and the DN of the object being referenced. The infrastructure FSMO role holder is the DC responsible for updating an object's SID and distinguished name in a cross-domain object reference.  NOTE: The Infrastructure Master (IM) role should be held by a domain controller that is not a Global Catalog server(GC). If the Infrastructure Master runs on a Global Catalog server it will stop updating object information because it does not contain any references to objects that it does not hold. This is because a Global Catalog server holds a partial replica of every object in the forest. As a result, cross-domain object references in that domain will not be updated and a warning to that effect will be logged on that DC's event log.

If all the domain controllers in a domain also host the global catalog, all the domain controllers have the current data, and it is not important which domain controller holds the infrastructure master role.

d) RID Master FSMO Role: The RID master FSMO role holder is the single DC responsible for processing RID Pool requests from all DCs within a given domain. It is also responsible for removing an object from its domain and putting it in another domain during an object move. When a DC creates a security principal object such as a user or group, it attaches a unique Security ID (SID) to the object. The Relative ID Master assigns blocks of Security Identifiers (SID) to different DCs they can use for newly created objects. Each object in AD has an SID, and the last few digits of the SID are the Relative portion. In order to keep multiple objects from having the same SID, the RID Master grants each DC the privilege of assigning certain SIDs.

e) PDC Emulator FSMO Role: The PDC emulator is necessary to synchronize time in an enterprise. Windows includes the W32Time (Windows Time) time service that is required by the Kerberos authentication protocol. All Windows-based computers within an enterprise use a common time. The purpose of the time service is to ensure that the Windows Time service uses a hierarchical relationship that controls authority and does not permit loops to ensure appropriate common time usage.

In a Windows domain, the PDC emulator role holder retains the following functions:

  • Password changes performed by other DCs in the domain are replicated preferentially to the PDC emulator.
  • Authentication failures that occur at a given DC in a domain because of an incorrect password are forwarded to the PDC emulator before a bad password failure message is reported to the user.
  • Account lockout is processed on the PDC emulator.
  • The PDC emulator performs all of the functionality that a Microsoft Windows NT 4.0 Server-based PDC or earlier PDC performs for Windows NT 4.0-based or earlier clients.

Τρίτη 29 Οκτωβρίου 2019

OTRS (Open Technology – Real Service) is an open source ticket request system with many features to manage customer telephone calls and emails. It is distributed under the GNU General Public License (GPL) and tested on various Linux platforms.  OTRS

Παρασκευή 28 Ιουνίου 2019

Update CentOS 7.x to specific version.

How to update CentOS 7.x to specific version or upgrading the Centos 7.x System Off-line with ISO and Yum.
In this tutorial we will show you, how to configure and use local yum repository and upgrade Centos 7.x to a specific version. For example 7.2 to 7.4

1) On Centos 7.2 server run the following Commands.
# yum install net-tools
# yum install wget
# yum install vsftpd
# systemctl start vsftpd.service
# systemctl enable vsftpd
# yum install createrepo

2) Disable SELinux
# vi /etc/selinux/config
Change: SELINUX=disabled
Save the file
# cat /etc/system-release
# reboot

3) Download Centos 7.4 and mount the .iso file.
# cd /root
# mkdir Software
# cd Software
# wget http://mirror.nsc.liu.se/centos-store/7.4.1708/isos/x86_64/CentOS-7-x86_64-Minimal-1708.iso
# cd /media
# mkdir ISO
# mount -o loop /root/Software/CentOS-7-x86_64-Minimal-1708.iso /media/ISO

4) Copy Centos 7.4 media content to the Server.
# mkdir /localrepo
# cp -rv /media/ISO/* /localrepo/

5) Configure a Local Repository.
First we need to backup current repository folder.
# cd /etc
# cp -r yum.repos.d yum.repos.d-old

Now delete all online repository and create local Repository File.
# rm -rf yum.repos.d/*
# vi yum.repos.d/local.repo

Add the following:
[centos74]
name=centos74
baseurl=file:///localrepo/
enabled=1
gpgcheck=0

Save the file and exit.

[centos74] – Name of the Section.
name = Name of the repository
baseurl = Location of the package
Enabled = Enable repository
gpgcheck= Enable secure installation

gpgcheck is optional (If you set gpgcheck=0, there is no need to mention gpgkey)
gpgkey = Location of the key

6) Now we need to update, and enable  the local repository.
# createrepo /localrepo/
# yum clean all
# yum repolist all

7) Update Centos 7.2 to 7.4 ussing local repos.
# yum update

Τρίτη 20 Νοεμβρίου 2018

Ookla Speedtest, CentOS 7



 
In this tutorial, we'll be install Speedtest-cli (Ookla Speedtest) to test the Internet Connection speed of your CentOS server. Here’s what you need to do:

  1. Install Python
    # yum install -y python
  2. Downloading the Speedtest-CLI from Github
    # wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
  3. Making Script Executable
    # chmod +x speedtest.py
  4. Run the script.
    # ./speedtest.py

Τετάρτη 4 Ιουλίου 2018

List Installed Programs in Windows

Reinstalling Windows is a good way to fix some problems with your computer. But before reinstall Windows, you should have a list of installed programs, on your computer so you know what you want to reinstall on the new system. To generate a list of installed programs on a Windows PC, we need:

1) Open a Command Prompt as Administrator. 
2) At the command prompt, type in wmic  (Windows Management Instrumentation Command.)
3) Enter the following command line at the wmic:root\cli
    /output:C:\Programs.txt product get name,version
4) The Programs.txt file is created on the root of the C: drive.

Τετάρτη 23 Μαΐου 2018

Install, Configure FTP Server in CentOS 7.3

In this guide we will describe the steps to install and configure a FTP server
(Very Secure FTP Daemon) in CentOS 7.x


1. Install and Enable Firewalld
Install and Enable Firewalld to start at boot:
#  yum install -y firewalld
#  systemctl start firewalld
#  systemctl enable firewalld
#  systemctl status firewalld
 

2. Open FTP Service ports on Firewall:
# firewall-cmd --state
# firewall-cmd --get-default-zone
# firewall-cmd --zone=public --add-port=22/tcp --permanent
# firewall-cmd --zone=public --add-port=21/tcp --permanent
# firewall-cmd --zone=public --add-service=ftp --permanent
# firewall-cmd --reload
# firewall-cmd --list-ports


To check whether the port was added to iptables rules:
# iptables-save | grep 22
# iptables-save | grep 20

3. Update your repository and install VSFTPD package.
# yum check-update
# yum -y install vsftpd
 

4. VSFTP.
After installation you can find /etc/vsftpd/vsftpd.conf file which is the main configuration file for VSFTP. Take a backup copy before making changes. 
# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak
# cd /etc/vsftpd/
# vi vsftpd.conf


Find this line anonymous_enable=YES (Line no : 12) and change value to NO to disable anonymous FTP access.
$ anonymous_enable=NO

Uncomment the below line (Line no: 100 ) to restrict users to their home directory.
$ chroot_local_user=YES

And add the below lines at the end of the file to enable passive mode and allow chroot writable.
allow_writeable_chroot=YES
pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=40100
 

5. Restart vsftpd service
# systemctl restart vsftpd.service
# systemctl enable vsftpd.service
 

6. Create an User for ftp access
Now create a User for ftp access. Here /sbin/nologin shell is used to prevent shell access to the server. Keep in mind to use strong passwords for FTP Users

For example:
# useradd -m user1 -s /sbin/nologin
# passwd  *********


That’s it.
You are ready to use FTP Server.

Τετάρτη 4 Απριλίου 2018

Setting Up NTP (Network Time Protocol)

Setting Up NTP (Network Time Protocol)
NTP (Network Time Protocol) is a protocol which allows computers to synchronize time.
NTPd is a daemon that maintains the system time in synchronization with other NTP servers

1) Configure TimeZone
Before anything else, you need to assign the correct time zone.
To get the current configuration, type:
# timedatectl

If you wish to change the timezone please follow following steps.
# timedatectl list-timezones

To set your time zone you can use command below: (e.g. Athens Greece)
# timedatectl set-timezone Europe/Athens

2) Install NTPD
Now you need to install the NTPD service at boot:
NTP package is provided by default from RHEL repositories, and can be installed running the following command.
# yum install ntp

Activate the NTP service at boot: 
# systemctl enable ntpd

Start the NTP service:
# systemctl start ntpd

3) NTP configuration:
# vi /etc/ntp.conf
Check the followings.
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

To get some information about the time synchronization process, type:
# ntpq -p

Alternatively, to get a basic report, type:
# ntpstat

To quickly synchronize with external server, type:
# systemctl stop ntpd
# ntpdate pool.ntp.org

4 Apr 09:53:22 ntpdate[6549]: adjust time server xxx.xxx.xxx.xxx offset -0.000160 sec

# systemctl start ntpd