Archive for the ‘LINUX’ Category

In this tutorial i will show you how to configure DNS server in Linux. We will learn to configure zone file and reverse lookup zone file.We will also learn about dns packages and dns services.We will also learn to change the ownership of files which we need to change.I have used Virtualbox for configuring and testing this DNS lab.The operating system i used for DNS server is RHEL5 and the DNS Client machines is WindowsXP.

Learn More server configuration on Linux.

DHCP SERVER Configuration in Linux.

NIS Server Configuration on Linux.

Apache server Configuration on Linux

 

The ip address for DNS server is 192.168.0.254 and domain name is xyz.com

(more…)

DHCP Server configuration in Redhat Enterprise Linux. In this tutorial we will learn how to configure DHCP Server on Linux.Then we will see how dhcp client machine will receive ip address from DHCP server.


Subnet and netmask should be 192.168.0.0 255.255.255.0


Gateway Should be 192.168.0.254


DNS Sever Should be 192.168.0.254


Domain Name will be xyz.com


Range from 192.168.0.10- 192.168.0.100


DNS Configuration on Linux.
NIS Server Configuration on Linux.
Apache Web server Configuration on Linux.

So let’s assign IP Address, default  Gateway IP and domain Name and range as we have decided above.

(more…)

In this article i will explain how you can encrypt your Linux hard drive or Linux Drive or Partition using LUKS.I will create a partition /dev/sda2 here and then  I will show you how to encrypt this partition using LUKS or you can say how to password protect this drive using LUKS.I will explain the complete procedure in few simple steps.So you need to just read each and every line carefully and you will be able to do this task easily.

(more…)

This article is all about Linux System Administrator Interview question.Here i will discuss all the questions which mainly asked during Linux system admin interviews.I will highlight the questions which generally all Linux system admins have faced during his interview.

(more…)

In this tutorial we will learn and try to understand the types of files in Linux and how to identify them all.Before using any operating system we must know about the types of files available in those operating system.Like other OS Linux OS also has some files and each files have different properties and assigned for different task.

Types of files in linux.

The following are the list of file types, and their associated character:

• – regular file
• d directory
• b block device
• c character device
• l symbolic link
• s socket link, also called a Unix networking socket
• p first-in first-out (FIFO) buffer, also called a named pipe

(more…)

If you are a Linux User and you are using Linux for storing data and doing multiples tasks then you must need to manage your hard drive in linux.sometimes you need to create new partition,sometimes you need to delete some of your partitions as per your requirement.And if you don’t have idea about how to create and delete partition in Linux then it will become very hectic task for you to manage your data in Linux and sometimes it may result in Data Loss.even many people used Linux and windows together in Dual Boot(mean Windows and Linux Together in a Hard Disk).In such case even a little mistake done at Linux Side can Destroy  your all Windows data because all data resides on same Hard Disk.

ethical Hacking

So for everyone who wants to keep Linux in His/Her laptop or Computer this article is for you.here in this article i am going to show you how to Create and Delete partitions in Linux very easily in just few simple steps.

(more…)

I have already written two articles on User and Group management in Linux.here in this article mostly i focused on how to create and delete multiple users or multiple groups in linux at a time.And we will also learn How to create a series of Linux Users in a sequence like from U1 to U100 at a time and delete them.

User and Group Management For Linux User Part-1
User and Group Management For Linux User Part-2
How to Lock and unlock Users in Linux in Detail.

And Now this is part-3 of User and Group Management Tutorial in Linux.

(more…)

I have already written an article on how to create users and group in Linux and how to manage it along with few script to add users and Groups in Linux.This tutorial is enhanced form of my previous article User and Group Management Tutorial for linux User Part-1.

How to Lock and Unlock Users in Linux.

In this article we will learn some typical and conceptual thing about customizing and managing  Users and Groups in Linux Machines like changing Users home Directory,Creating Users in Linux with Custom Home Directory,Adding a user even without any Home Directory,Creating Users with custom User ID,Creating Users with Custom Group ID,Adding a User to Multiple Groups,Creating a User with Account Expiry date,Creating a User with Custom Comments and Many more.

(more…)

In this tutorial we are going to build our own customize kernel for our RedHat Enterprise Linux.Before we go further i love to remind you that we will do all these process as root user and all the commands will be performed inside your linux kernel Directory which is located inside /usr/src folder. (more…)

In this tutorial we will learn about user and group management in linux.We will learn how to add and delete user and groups in linux.We will also learn how add multiple users and groups through simple script or program.Our this article contains linux user database and password related information.We will also see how to display or check password status of any linux user and how to set password expiry date for any linux user.Not only this we will also learn how to set account expiry date and set user to be inactive after certain number of inactive days.

There are many more in this article and to gain all you have to go through this article.

You can also read:

User and Group Management in Linux Part-2

User and Group Management in Linux Part-3

How to Lock and Unlock Users in Linux.

(more…)

In this tutorial we will learn how to configure advance permissions using ACL(Access Control List).

In this article we will learn following:

1.How to check the ACL on files or folders using getfacl command.
2.How to identify files/directories that have ACL.
3.How to set ACL on specif files or Folders.
4.How to create the same ACL on all newly created files automatically.
5.How to remove particular ACL entry.
6.How to remove all ACL entries from a file or folder.

Before starting this lab  we will create some users some groups and some files and folders in linux to test acl command and show it with examples.

(more…)

NFS(Network File System) is a distribute File System Protocol which is used to share data over network.We configure a Linux Machine as a NFS Server and the data get stored on SERVER Machine and then get distributed to different linux client machines over network. Here in this tutorial we will learn how to configure that NFS server in RedHat Enterprise Linux  and then also learn what to do at client side to access data shared by NFS server over network. (more…)

In this tutorial we will learn how to create encrypted partition in linux and at the same time we will also learn how to create mapping of encrypted partition in linux.One who want to secure his data by encrypting his hard drive can be done very easily after reading this article.

This article will show you step wise methods to encrypt a partition in redhat enterprise linux using cryptsetup command.We are using LUKS which is standard for linux hard disk encryption in this tutorial.

LUKS stands for  Linux Unified Key Setup.

LUKS stores it information in partition header and enable the user to transport his/her data seamlessly and is free.

Using LUKS we will learn how to unmount to secure our data.

Using LUKS we will also learn how to mount or remount encrypted partition in linux.

We will also learn how to change LUKS password or passphrase for encrypted partition. (more…)

This tutorial is all about how to convert an ext3 file system in linux to an ext4 file system without having any loss in data.You can also say that this article is about file system upgradation in linux without any data loss. Whenever you need to upgrade your linux file system from ext3 to ext4 you can upgrade it very easily without losing your data.

Here in this article i have mentioned step wise method to convert an ext3 file system to ext4 file system without any loss in data. (more…)

Dmidecode utility is used to find or view Bios and hardware  information about our machine.This article will be very helpful in troubleshooting through your linux machine.It will help you to know the exact information about the device and drivers required for your motherboard.If you want to know exact model of your computer which includes motherboard,processor,hard drive,dvd writter,usb slot,graphics card,network card,bios,manufacturer etc you can easily get all those information using this command.

 

How to see the Model of Your Computer?

 

1
2
3
[root@satish ~]# dmidecode |grep Product
        Product Name: PI945GCM
        Product Name: PI945GCM

 

If you use only dmidecode command without any other option it will show you the Complete Information it have.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[root@satish ~]# dmidecode
# dmidecode 2.9
SMBIOS 2.5 present.
27 structures occupying 1305 bytes.
Table at 0x000FD620.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: American Megatrends Inc.
        Version: 080012
        Release Date: 08/16/2007
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 512 kB
        Characteristics:
                ISA is supported
                PCI is supported
                PNP is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ESCD support is available
                Boot from CD is supported
                Selectable boot is supported
                BIOS ROM is socketed
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 KB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                CGA/mono video services are supported (int 10h)
                ACPI is supported
                USB legacy is supported
                LS-120 boot is supported
                ATAPI Zip drive boot is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
        BIOS Revision: 8.12

 

 

But if you want to see some specified things you need to put options for that with dmidecode command.

Examlple:

How to see the L1&L2 Caches Related Information present in Your PC.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[root@satish ~]# dmidecode -t cache
# dmidecode 2.9
SMBIOS 2.5 present.</code></span>
Cache Information
        Socket Designation: L1-Cache
        Configuration: Enabled, Not Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 64 KB
        Maximum Size: 64 KB
        Supported SRAM Types:
                Other
        Installed SRAM Type: Other
        Speed: Unknown
        Error Correction Type: Parity
        System Type: Data
        Associativity: 8-way Set-associative
Handle 0x0006, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L2-Cache
        Configuration: Enabled, Not Socketed, Level 2
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 1024 KB
        Maximum Size: 1024 KB
        Supported SRAM Types:
                Other
        Installed SRAM Type: Other
        Speed: Unknown
        Error Correction Type: Single-bit ECC
        System Type: Instruction
        Associativity: 8-way Set-associative
Handle 0x0007, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L3-Cache
        Configuration: Disabled, Not Socketed, Level 3
        Operational Mode: Unknown
        Location: Internal
        Installed Size: 0 KB
        Maximum Size: 0 KB
        Supported SRAM Types:
                Unknown
        Installed SRAM Type: Unknown
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown

 

How to see the manufacture name of your Processor?

1
2
[root@satish ~]# dmidecode -s processor-manufacturer
Intel

How to get the information related to your BIOS?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[root@satish ~]# dmidecode -t bios
# dmidecode 2.9
SMBIOS 2.5 present.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: American Megatrends Inc.
        Version: 080012
        Release Date: 08/16/2007
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 512 kB
        Characteristics:
                ISA is supported
                PCI is supported
                PNP is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ESCD support is available
                Boot from CD is supported
                Selectable boot is supported
                BIOS ROM is socketed
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 KB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                CGA/mono video services are supported (int 10h)
                ACPI is supported
                USB legacy is supported
                LS-120 boot is supported
                ATAPI Zip drive boot is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
        BIOS Revision: 8.12
Handle 0x000D, DMI type 13, 22 bytes
BIOS Language Information
        Installable Languages: 1
                en|US|iso8859-1
        Currently Installed Language: en|US|iso8859-1

 

How to see the information about memory of your system?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[root@satish ~]# dmidecode -t memory
# dmidecode 2.9
SMBIOS 2.5 present.
Handle 0x0008, DMI type 5, 24 bytes
Memory Controller Information
        Error Detecting Method: 64-bit ECC
        Error Correcting Capabilities:
                None
        Supported Interleave: One-way Interleave
        Current Interleave: One-way Interleave
        Maximum Memory Module Size: 4096 MB
        Maximum Total Memory Size: 16384 MB
        Supported Speeds:
                Other
        Supported Memory Types:
                DIMM
                SDRAM
        Memory Module Voltage: 3.3 V
        Associated Memory Slots: 4
                0x0009
                0x000A
                0x000B
                0x000C
        Enabled Error Correcting Capabilities:
                None
Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: DIMM0
        Bank Connections: 0 1
        Current Speed: Unknown
        Type: DIMM SDRAM
        Installed Size: 1024 MB (Double-bank Connection)
        Enabled Size: 1024 MB (Double-bank Connection)
        Error Status: OK
Handle 0x000A, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: DIMM1
        Bank Connections: 2 3
        Current Speed: Unknown
        Type: DIMM SDRAM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK
Handle 0x000B, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: DIMM2
        Bank Connections: 4 5
        Current Speed: Unknown
        Type: DIMM SDRAM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK
Handle 0x000C, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: DIMM3
        Bank Connections: 6 7
        Current Speed: Unknown
        Type: DIMM SDRAM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK
Handle 0x000F, DMI type 16, 15 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: None
        Maximum Capacity: 4 GB
        Error Information Handle: Not Provided
        Number Of Devices: 4
Handle 0x0011, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x000F
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 1024 MB
        Form Factor: DIMM
        Set: None
        Locator: DIMM0
        Bank Locator: BANK0
        Type: SDRAM
        Type Detail: Synchronous
        Speed: Unknown
        Manufacturer: Manufacturer0
        Serial Number: SerNum0
        Asset Tag: AssetTagNum0
        Part Number: PartNum0
Handle 0x0013, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x000F
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: DIMM1
        Bank Locator: BANK1
        Type: Unknown
        Type Detail: Unknown
        Speed: Unknown
        Manufacturer: Manufacturer1
        Serial Number: SerNum1
        Asset Tag: AssetTagNum1
        Part Number: PartNum1
Handle 0x0015, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x000F
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: DIMM2
        Bank Locator: BANK2
        Type: Unknown
        Type Detail: Unknown
        Speed: Unknown
        Manufacturer: Manufacturer2
        Serial Number: SerNum2
        Asset Tag: AssetTagNum2
        Part Number: PartNum2
Handle 0x0017, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x000F
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: DIMM3
        Bank Locator: BANK3
        Type: Unknown
        Type Detail: Unknown
        Speed: Unknown
        Manufacturer: Manufacturer3
        Serial Number: SerNum3
        Asset Tag: AssetTagNum3
        Part Number: PartNum3

How to see the information related to your system?

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[root@satish ~]# dmidecode -t system
# dmidecode 2.9
SMBIOS 2.5 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Kobian
        Product Name: PI945GCM
        Version: 1.X
        Serial Number: 1131
        UUID: 00020003-0004-0005-0006-000700080009
        Wake-up Type: Power Switch
        SKU Number: To Be Filled By O.E.M.
        Family: To Be Filled By O.E.M.
Handle 0x000E, DMI type 15, 35 bytes
System Event Log
        Area Length: 4 bytes
        Header Start Offset: 0x0000
        Header Length: 2 bytes
        Data Start Offset: 0x0002
        Access Method: Indexed I/O, one 16-bit index port, one 8-bit data port
        Access Address: Index 0x046A, Data 0x046C
        Status: Invalid, Not Full
        Change Token: 0x00000000
        Header Format: No Header
        Supported Log Type Descriptors: 6
        Descriptor 1: End of log
        Data Format 1: OEM-specific
        Descriptor 2: End of log
        Data Format 2: OEM-specific
        Descriptor 3: End of log
        Data Format 3: OEM-specific
        Descriptor 4: End of log
        Data Format 4: OEM-specific
        Descriptor 5: End of log
        Data Format 5: OEM-specific
        Descriptor 6: End of log
        Data Format 6: OEM-specific
Handle 0x0019, DMI type 32, 20 bytes
System Boot Information
        Status: No errors detected

How to see the information related to your system slot?

1
2
3
[root@satish ~]# dmidecode -t slot
# dmidecode 2.9
SMBIOS 2.5 present.

Use -s Option to know some options

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[root@satish ~]# dmidecode -s
dmidecode: option requires an argument -- s
String keyword expected
Valid string keywords are:
  bios-vendor
  bios-version
  bios-release-date
  system-manufacturer
  system-product-name
  system-version
  system-serial-number
  system-uuid
  baseboard-manufacturer
  baseboard-product-name
  baseboard-version
  baseboard-serial-number
  baseboard-asset-tag
  chassis-manufacturer
  chassis-type
  chassis-version
  chassis-serial-number
  chassis-asset-tag
  processor-family
  processor-manufacturer
  processor-version
  processor-frequency

 

How to see your processor Frequency?

1
2
[root@satish ~]# dmidecode -s processor-frequency
1600 MHz

 

How to know your system-uuid?

1
2
[root@satish ~]# dmidecode -s system-uuid
00020003-0004-0005-0006-000700080009

How to know Your System Product Name?

1
2
[root@satish ~]# dmidecode -s system-product-name
PI945GCM

How to know your BIOS VENDOR?

1
2
[root@satish ~]# dmidecode -s bios-vendor
American Megatrends Inc.

How to know your system serial number?

1
2
[root@satish ~]# dmidecode -s system-serial-number
1131

 

How to know chassis serial number?

1
2
[root@satish ~]# dmidecode -s chassis-serial-number
To Be Filled By O.E.M.

 

How to see your Processor version?

1
2
[root@satish ~]# dmidecode -s  processor-version
Intel(R) Pentium(R) Dual  CPU  E2140  @ 1.60GHz

 

(more…)

Today in this tutorial i am going to mention the few important difference between RHEL6 and RHEL7 version.If someone had already completed RHCE certification on RHEL6 version this article will help him/her to easily learn the RHEL7 and get adjusted with this Latest RedHat Enterprise Linux OS.The major issue with new OS is that we don’t know whether our previous command will work on this OS or not or we have to learn it from start once again.Here i want you to confirm that you dont need to do RHCE Training again if you already know RHEL6.

TO MAKE YOUR TASK EASY TO UNDERSTAND SOME BASIC DIFFERENCE BETWEEN RHEL6 AND RHEL7 I HAVE WRITTEN THIS ARTICLE AND THIS ARTICLE WILL MAKE YOUR TASK EASY AND YOU CAN EASILY GET FAMILIAR WITH YOUR NEW RHEL7.

(more…)

In this article we will learn how to Create,See,Mount,Use and Delete a partition in RHEL6 linux without reboot.In RHEL5 we use PARTPROBE command to update the changes made in partition table but in RHEL6 PARTPROBE command doesn’t work, in RHEL6 we use PARTX command.Here in this article we see step wise how to create,configure,manage,mount,use and delete a partition in RedHat Enterprise 6 Linux.In this article we also learn how to create an extended partition in linux and then how to create logical partition in linux and use it to store data. (more…)

If you are a linux user or a linux system admin then you face the sockets related problems almost daily while configuring your linux servers or during monitoring running services in your linux machine.In this article i am going to write how to know detail information about linux sockets running on your Linux server or computer.In this tutorial you will learn how to display raw sockets,unix sockets,udp sockets,tcp sockets,ipv4 sockets,ipv6 sockets,listening sockets.We will also learn how to see socket memory usage,process using socket and to see intenal tcp information using ss command in Linux. (more…)

Here in this article i am going to mention a detail article on “aureport” linux tool. This tool is used produce summary report of audit system logs and in this way help us to solve many complicated analysis.So here we will see how to use aureport command to see linux audit reports. (more…)

First of all you need to understand what the hell is this Apache Virtual Hosting?

Answer is simple and staright forward. setting up more then One Host/Site over Single Server is called Virtual Hosting.

There are mainly two types of Virtual Hosting :

1) Name Based Virtual Hosting
2) IP Based Virtual Hosting (more…)