Create two test users for testing purposes

Assignment Help Operating System
Reference no: EM131144600

Lab: Configure a sendmail server in Linux

Lab Scenario

Assignment

The purpose of this lab is to configure a sendmail server in Linux. Use the IP addresses that exist when you start Linux.

Virtual Machine Login Information for PLABFED01 and PLABFED02

Username: Student

Password: Password
Username: root

Password: Password
Lab Diagram

During your session, you will have access to the following lab configuration.

WINCONSOLE PLABFED01 PLABFED02

The Linux servers also connect to a private network. The IP address of PLABFED01 is 192.168.240.11 and the IP address of PLABFED01 is 192.168.240.12.

Connecting to Your Lab

In this module, you will be working on the following equipment to carry out the steps defined in each exercise.

• WINCONSOLE (Management Server)

• PLABFED01 (Linux Server)

• PLABFED02 (Linux Server)

Each exercise will detail which console you are required to work on to carry out the steps.

To start, simply click on the named server from the device list (located on the left-hand side of the screen) and click the "Power on" button from the Tools bar. In some cases, the devices may power on automatically.

During the boot-up process, an activity indicator will be displayed in the Name tab.

• Black-Powered off

• Orange-Working on your request

• Green-Ready to access

If the remote console is not displayed automatically in the main window (or pop-up), click the Connect icon located in the Tools bar to start your session.

If the remote console does not appear, please try the following option.

• Switch between the HTML 5 and Java client versions in the Tools bar.

In the event this does not resolve your connectivity problems, please visit our Help and Support pages for additional resolution options.
sendmail Configuration Step by Step

General Information

We configure the sendmail server for our local LAN in this lab.

The sendmail daemon is configured from a directory of files in /etc/mail and a directory of configuration files in /usr/share/sendmail-cf. There are two basic configuration files.

• /etc/mail/sendmail.cf The main sendmail configuration file

• /etc/mail/sendmail.mc A macro that's easier to edit, which can be used to generate a new sendmail.cf file

The configuration file that the sendmail server program reads is /etc/mail/sendmail.cf. But to change the configuration on the mail server, we modify the /etc/mail/sendmail.mc file using a text editor such as nano or vi. There are two ways to generate the sendmail.cf file: Start or restart the sendmail program or use the m4 command.

For this lab, we are using one Linux server, plabfed01, with IP address 192.168.240.11.

TASK A-Configure sendmail Server

Step 1. Use TigerVNC to log in to the plabfed01 system, open a terminal window, and switch to root (or you can use Putty to log in plabfed01 as root). Make sure the sendmail, mailx, and m4 packages are installed. Type the following commands.

#rpm -qa sendmail *

#rpm -qa mailx

#rpm -qa m4*

If they are installed, the commands' outputs look like this.

Step 2. If it tells you that the packages are not installed, then you need to install them; otherwise, skip Step 2.

To install sendmail on the Fedora Linux system, type the following.

#yum -y install sendmail

In order to configure sendmail, make sure to install the sendmail -cf package. To install sendmail.cf, type the following.

#yum -y install sendmail -cf

Sometime you may use the m4 macro processor to create a new /etc/mail/sendmail.cf. To install m4, type the following.

#yum -y install m4

To install a text-based utility program for sending and receiving mail, type the following.

#yum -y install mailx

To install all of the above packages, type the following.

#yum -y install sendmail sendmail -cf mailx m4

Step 3. You need to add your domain in /etc/hosts file to have sendmail configured correctly. Use nano or vi to edit the /etc/hosts file; its content should look like this.

Step 4. To make the hostname permanent, modify /etc/sysconfig/network file using nano or vi as editor. The file's content should look like this.

Step 5. To modify the hostname for the current session using the command hostname, type the following.

#hostname plabfed01.linuxlab.org

Step 6. Use nano or vi to add your domain entry in /etc/mail/local-host-names file, which is a list of hostnames sendmail is to accept as the local host name. Your file should look like this.

Step 7. To allow sendmail to accept network connections from any host, use nano or vi to modify the /etc/mail/sendmail.mc file and add the "dnl #" in front of line number 118. The string "dnl" is used for commenting.

Before:
After:

Note: DNL stands for "delete to new line."

Step 8. To generate a new sendmail.cf file by using m4, type the following.

#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Step 9. Now that we are ready to start sendmail, type the following.

#systemctl start sendmail.service

Step 10. To check sendmail status, type the following.

#systemctl status sendmail.service

An active sendmail status looks like this.

Note: If sendmail fails starting, check for errors using the command journalctl -xn, fix any typos, and restart the service with command #systemctl restart Sendmail.service until sendmail starts successfully. Below is a sample of journalctl -xn command output without any error.

Step 11. To enable the sendmail server at boot time, type the following.

#systemctl enable sendmail.service

TASK B-Validation and Testing

Step 1. Check the sendmail to listen to all interfaces at the host using this command.

#netstat -an | grep :25 | grep tcp

Below is a sample output of the netstat command.

Step 2. Create two test users for testing purposes (that will send and receive mail), use the following commands to add user accounts and to change user's password. Use the password Password for the testuser accounts. For the next several steps, my examples use user1 and user2 accounts. In the lab, you use testuser1 and testuser2 accounts.

#useradd testuser1

#useradd testuser2

#passwd testuser1

#passwd testuser2

Below are examples; I used user1 and user2 accounts (yours are a little bit different).

Step 3. Log in as the testuser1 and try to send mail using the mail command (tou can switch from root to testuser1).

Here are some examples.

Note:

• You can switch from root to testuser1 using su-testuser1. To exit from testuser1, type exit to get back to root.

• When using mailx, to terminate the text message, type . (dot), then hit the Enter key.

Step 4. To see whether the mail was sent correctly, use journalctl -xn to display messages.

Step 5. To check whether mail is delivered to testuser2, log in as the testuser2 and try to read mail using the mail command (again, you can switch from root to testuser2).

For example, see below.

Note:

• If there is more than one message, type the message number and hit the Enter key to read.

• To exit mailx, type q, then hit Enter.

TASK C-Lab Report Preparation

Step 1. Be sure you're in the root account. Clear the screen, type the command #cat /etc/hosts to display its contents, and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the /etc/hosts file.

Step 2. Be sure you're in the root account. Clear the screen and type the command #systemctl status sendmail.service to display the sendmail daemon status and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the #systemctl status sendmail.service command.

Step 3. Be sure you're in the root account. Clear the screen and use the command #tail -4 /etc/passwd file to display its last four lines and capture the Linux desktop, then save this image to your Lab Report document in the space allocated for the #tail -4 /etc/passwd command.

Step 4. Switch to testuser1. Use the mail command to send the message "Hello!!! My name is ‘your first name'" (include your real first name) to testuser2. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for sending mail to testuser2.

Step 5. Switch to testuser2. Use the mail command to read the message from testuser1. Capture the Linux desktop and save this image to your Lab Report document in the space allocated for read mail from testuser1.

Reference no: EM131144600

Questions Cloud

Do you believe that having internet access : Do you believe that having Internet access, as the author suggests, is not a convenience or luxury, but a human right? List one benefit that closing the digital divide might provide (e.g. economic growth).
What is expected value of the npv for each of the projects : What is the expected value of the NPV for each of the projects - what is the standard deviation of the NPV for each of the projects?
Make an evaluation of a movie : write about movie:-  summary for the movie, thesis, unlike any other movies, what kind of movie, dialogue, acting. - definition-  main body- Dialogue and Explain give some example.
Identify system stakeholders and formulate their needs : Identify system stakeholders and formulate their needs. Create a use case based on relating functional requirements. Use technology and information resources to research issues in systems analysis and design.
Create two test users for testing purposes : Create two test users for testing purposes (that will send and receive mail), use the following commands to add user accounts and to change user's password. Use the password Password for the testuser accounts.
Current facility managers have learned from predecessors : What do you think current facility managers have learned from their predecessors? What similarities and differences can you see between Madison Square Garden and Maple Leaf Gardens? Why did modern universities build major sport and recreation complex..
Biological view on hypnosis and whether it really works : Write a custom essay on the topic "Biological View On Hypnosis And Whether It Really Works".
How will you market or promote your product/service : How will you market or promote your product/service? I.e., online sales, social media marketing, search engine optimization, personal selling, etc. Describe in detail.
Review your current level of adjustment : Reflect on how well you are adjusting to your life in terms of subjective well-being, diversity, contexts, and / or thinking critically.

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd