Thursday 10 December 2015

Linux Boot Process


Linux Boot Process

 

In this article we are going to study “Linux Boot Process”. During booting time of Linux operating system, boot process have to go through six basic stages.

Boot Stage 1:

BIOS Checks: When a Linux server or desktop or laptop booted, The processor goes for Basic Input/Output System or BIOS program and runs it.The BIOS controls does not controll only the first step of the boot process, but BIOS also provides the lowest level interface to peripheral devices. It means during the BIOS initialization, all hardware peripheral devices checked out by BIOS. If BIOS found any hardware is faulty, you will get message on your screen.For this reason BIOS Process is written into read-only mode.The BIOS then loads into memory whatever program is residing in the first sector of this device, called the Master Boot Record or MBR. The MBR is only 512 bytes in size and contains machine code instructions for booting the machine, called a boot loader, along with the partition table. Once the BIOS finds and loads the boot loader program into memory,it yields control of the boot process to it.

Note: The default boot loader for Linux platform is GRUB.

Boot Stage 2:

First stage boot loader: The first stage of Boot Loader is a small machine code binary on MBR. The first stage boot loader loads itself into memory.first stage boot loader job is to find out the second stage boot loader and load the first part of it into memory.

Boot Stage 3:

Second stage boot loader: The second stage boot loader loads the kernel into memory, which in turn loads any necessary modules and mounts the root partition read-only. Once the second stage boot loader is in memory, it presents the user with a graphical screen showing the different operating systems or kernels that has been configured to boot. You can use Arrow keys to select your operating system for boot.

Stage 3.5: the Second Stage Bootloader loads the Linux Kernel and hands control to it. The Kernel takes control of the hardware. This includes taking control of the memory management hardware, timers, interrupts, etc. The processor is no longer in x86 16-bit mode like it was when the BIOS started. The kernel will start using other processors and/or additional cores within processors. Linux may have some modules pre-compiled into the kernal, and may also load some modules from disk as needed, such as device driver modules that apply to the actual hardware present on this system. Once the kernel is fully running, it starts a single user space process, which is the ancestor of all processes: /sbin/init. Up until this point, all Linux systems work very similarly. Once /sbin/init begins, this is where the major differences between distributions become highly visible.

Boot Stage 4:

INIT Program: The Linux operating system kernel transfers the control of the boot process to the /sbin/init program.The /sbin/init program  coordinates the rest of the boot process and configures the environment for the user.

Boot Stage 5:

User Environment Setup: The init program loads all services and user-space tools, and mounts all partitions listed in /etc/fstab. When the init command starts, it becomes the parent or grandparent of all of the processes that start up automatically on the system. First, it runs the /etc/rc.d/rc.sysinit script, which sets the environment path, starts swap, checks the file systems, and executes all other steps required for system initialization.The init command then runs the /etc/inittab script, which describes how the system should be set up in each SysV init runlevel.The init program starts all of the background processes by looking in the appropriate rc directory for the runlevel specified as the default in /etc/inittab. The rc directories are numbered to correspond to the runlevel they represent.

Note: By Default, run level 5 is defined in /ete/inittab file.

Boot Stage 6:

Login Screen: The user will get a login screen for the freshly booted Linux system.

 

Tuesday 12 May 2015

Linux Interview Questions For Experienced

Why should you periodically update the kernel and package versions?
To enhance the security of system you should ensure that you are using the latest versions kernel and software packages that contain the most recent security updates.
During a recent strikes at office, several archive tapes of the system were damaged and ruined. What can you do to prevent the physical damage in future?
You should store them at offsite.
Why should you avoid the Telnet to administer a Linux system remotely?
Telnet use most insecure method for communication. It send data across the network in plain text format. Someone easily find out the password using the network tool.
A file is unable to be restored from tape due to several device and media errors. What is most likely the cause?
Media errors usually indicate that the tape media is damaged, or that the tape drive heads need cleaning.
Your FTP Server recently hacked. Due to the amount of damage, the entire server needs to be restored. How should you restore the original kernel system files?
You cannot restore the entire operating system from tap back up device. So you should reinstall the core operating system, and then restore system configuration files and user data from tape backup device.
Your company hire a contract employee for two months. What should the Linux administrator do to enhance security on the employee's account?
While creating new user account for this user, administrator should set the expiration date for his account, so that if the employee leaves or does not have their contract renewed, the account will be automatically disabled.
Which backup strategy only backs up files that have changed since the last full backup?
Differential backup will backup files that have changed since the last full backup.
Name a service which should you disable on a Linux Server which is acting as both a Web and FTP Server.
The finger service should be disabled because a remote user can get important information about the system by using that command.
Why it is recommended to store backup tapes to an offsite storage facility?
Because this will prevent the backup taps from being destroyed during a natural disaster at the server site. It also prevents the tapes from being stolen.
A newbie enabled the root session for FTP server. is it ok?
No, he has put the security of entire server on risk. You should disable to root session as soon as possible.
A user complains you that he is unable to set '123' as his password. Why would not the system allow this password?
There would be a minimum length rule for password, which is blocking user to use this password. Default minimum length rule for password is six characters. It means a user cannot have password less than six characters.
Your company is running Web Server. One dedicate account holder customer complains that his visitors are able to scan the directory tree. Which directive would you configure to stop web server from listing the directory?
You should remove / comment the "Options Indexes" directive from the main configuration file ' httpd.conf' of the web server. This is a security measure so that remote users can’t scan the directory tree of the server looking for security holes. Server won’t show directory listings if requested by a user.
What type of backup strategy can you use to fully back up a system every night?
You can use full backup strategy that will always perform a full backup of all files. This takes much more time and space than other methods, but is it the most complete method and allows for easy file restoration.
How can you enhance the security of password file?
Linux keep user account information in a text file called /etc/passwd. This file also store one way encrypted password. This file is accessed by several tools to get user information, so file need to world readable. This is a security risk. To minimize the security risk you can use shadow password format. This method save account information in regular file /etc/passwd. However, the password is stored as a single "x" character (not actually stored in this file). A second file, called "/etc/shadow", contains encrypted password as well as other information such as account or password expiration values, etc. The /etc/shadow file is readable only by the root account and is therefore less of a security risk
What command should be used to make a tar archive to a disk file system located in /mnt/backup?
The correct command is tar -cvf /mnt/backup. The /mnt/backup directory should be on another machine to be fully effective as a backup strategy.
You have just finished the installation of sever. This server is going to be use as file server. Default installation have send mail service running, while this server will never send any e-mails. How should you deal with send mail service?
You should disable the send mail service if server is not being used for mail purpose. Leaving them running can increase the chance of a security vulnerability being exploited, and unauthorized use of sendmail relay.
What command can you use to back up an entire file system most efficiently?
The easiest command to use to back up an entire file system is the dump command. Files can be restored from a dump operation by using the restore command.
Which necessary steps should you take to enhance the security of server just after the initial installation?
  • Kernel and packages should be upgraded to the latest versions.
  • Unnecessary services and daemons should be disable.
  • Enable and configure firewall
  • Set a complex password policy.
While auditing user accounts, an administrator notices that one of the users has a blank password. What should he do to the account?
To prevent further use of the account, which is an immediate security risk, disable it and set a temporary password for the user for the next time they login.
Which backup strategy backs up all files that have changed since the last backup?
An incremental backup will only back up files that have changed since the last backup.
Your company has terminated a server administrator. What is first thing as an administrator should you do to enhance the security?
Because the server administrator knows the root password for the server, it should be changed immediately to prevent them from tampering with the system.
You are setting up an FTP server. Only company employees are allowed to use the FTP services. What should you configure on the FTP server to enhance security?
You should disable the anonymous FTP account, so that only users with a username and password can access the system.
What is the location of system configuration files that should be backed up on a regular basis?
The /etc directory contains most of the Linux system configuration files.
Which permission allows a user to run an executable with the permissions of the owner of that file?
The Set-User-ID is a special permission that allows a user to run an executable with the permissions of the owner of that file.
What command can you use to make a tape archive file of a /home directory, and send it to the /dev/tape device?
The correct command is tar -cvf /dev/tape /home.
The -xvf option is used to extract files from an archive.
Employees at your company are lazy in changing the password. As a system administrator what can you do to minimize the security risk?
You can setup a password policy which enforce user to change his password after a specific time periods.
Which program should you use to connect a system remotely?
You should always use SSH to connect a system remotely. SSH is a secure method that encrypts the entire session.
To save disk space, an administrator wants to backup files, and then remove them from the server permanently. What kind of backup operation is this?
An archive operation will take the files, back them up to a device, and then remove the files from the original server.
What does firewall do?
Firewall is a device or service which can be used to protect the network or system from other outside networks.

Wednesday 22 April 2015

linux interview questions FOR RHCE

Which version of RHEL officially supports LUKS encryption?

From version 6 or higher LUKS encryption is officially supported by RHEL.

What is the default virtualization technology for RHEL6 ?

Default virtualization technology is KVM.

Can you configure KVM Virtual machine on 32 bit system ?

No, KVM virtualization requires at least 64 bit system.

What is default mode of SELinux during the installation of RHEL ?

  • In RHEL5 you have to choose the mode which you want.
  • From RHEL6 default mode is Enforcing during the installation.
However you can change the mode of SELinux after installation, only difference between RHEL5 and RHEL6 is that in RHEL5 asks you to choose the mode while RHEL6 does not let you to choose the mode during the installation.

Which remote management service is allowed through the default firewall and by default installed in RHEL?

By default SSH is always installed in RHEL. SSH uses port 22 which is allowed through the default firewall rules.

Which standard directory is used by vsFTP server for file sharing ?

Default Standard directory for ftp is /var/ftp/pub.

Which standard directory is used by Apache web server for HTML files ?

standard directory for HTML files is /var/www/html

What is the default partition layout during the installation ?

Default partition Layout is the LVM.

Which necessary partition cannot be a part of logical volume group ?

boot partition cannot be a part of logical volume group. You must have create it as a regular partition.

Which partitions are recommended for custom layout of partition ?

  • /
  • /boot
  • /home
  • swap

What step during the installation could you take to prevent a program from creating temporary files that fill up the entire space ?

You can create a separate /tmp partition prevents a program from creating temporary files that fill up the entire filesystem.

What is the kickstart ?

kickstart is a installation method used in RHEL. A kickstart installation is started from a kickstart file, which contains the answers to all the questions in the installation program.

Name any of two third party distribution based on RHEL6 source code.

CentOS and Scientific Linux

Which Log file contains all installation message?

install.log.syslog file contains all messages that were generated during the installation.

Wednesday 8 April 2015

linux interview questions 1

What is Kerberos used for?

Kerberos is used for secure network logon.
Which partition store system configuration files in Linux system?
/etc partition stores system configuration files in Linux.
What is the purpose of the MD5 option on passwords?
MD5 is an encryption method that encrypts the password before saving.
Name any four general password rules for user account.
  • Include at least eight total characters
  • Use the string in an unrepeated way
  • Avoid use words that can be found in the dictionary
  • Avoid use dates of significance, such as a birthday or anniversary
A better method of password security is to create difficult-to-break passwords that are easy for the users to remember.
What is the alternative method to a GUI installation in Linux ?
Linux provides text base installation as the alternative method of GUI installation.
What is the purpose of the swapon command ?
swapon command is used to activate a already created swap partition. It cannot be used to create a new swap partition.

What is gzip?

gzip is a compression utility created by the GNU project.

What is tar?

tar is an archive utility that is used to create tape backups.
Which is the standard command used to uncompress gzip files?
The standard command used to uncompress gzip files is gunzip.
What is the RPM switch for only installing packages?
The command line switch for installing an RPM is -i.
What is the command used to install an RPM package named demofilename2.2-2.i386.rpm?
The most common command used to install an RPM package is rpm -ivh. Following command will install the given package
#rpm -ivh demofilename2.2-2.i386.rpm
What is the command used to remove an RPM package named demofilename2.2-2.i386.rpm?
The most common command used to remove an RPM package is rpm -evh. Following command will remove the given package
#rpm -evh demofilename2.2-2.i386.rpm
What is the command used to update an RPM package named demofilename2.2-2.i386.rpm?
The most common command used to update an RPM package is rpm -Uvh. Following command will update the given package and remove the old.
#rpm -Uvh demofilename2.2-2.i386.rpm
Which command is used to see which RPM version of gzip was installed on the system?
#rpm -q gzip
Where are the automatically mounted file systems listed?
The automatically mounted file systems are listed in the file /etc/fstab.
While installing the new RPM what common steps should take ?
You should follow these common steps
  • Use RPM tools should be used to query or verify the installed packages to
  • confirm the installation of any previous packages.
  • Check the signature of new package
  • RPM should be installed or upgraded by first using the test mode to verify that it works, and then it should be installed
  • At the end query the RPM and verify the installation of RPM
Which organization controls the official releases and updates of the X Window System?
The X Consortium at www.x.org controls the official release and updating of the X Window System
PPP is most often used to create?
PPP is most often used to create serial point-to-point connections.
When attempting to connect to www.example.com you got unknown host message. Which service is most likely not functioning properly?
DNS
Samba is used to provide support for which protocol?
Samba is used to support the Microsoft SMB/CIFS systems.
What command is used to load a module into the kernel?
The insmod command is used to load a module into the kernel
Name one of the most secure method of remote access.
SSH is the most secure method of remote access
With respect to a Linux system’s RAM, how large should the swap file be?
Generally the size of the swap file should be twice the size of installed RAM.
How would you create a backup of the fstab file to the /backup folder?
Use cp command to create the backup.
#cp /etc/fstab /backup
What command is used to exit the edit mode of VI editor?
The [esc] key is used to exit from the edit mode of VI editor.
What key combination will exit from VI editor and not save the changes made?
Esc + q +! Key combination will exit VI without saving the changes.
What command would you use to create a file system on a new hard drive?
The mkfs command is used to create file systems.

What fstab file do?

The fstab file is used to automatically mount file systems.

What inittab file do?

The /etc/inittab file is used to perform the default state and terminal connections for a Linux system.
What command can you use to verify the current active shell?
The env command will display the current active shell.
Where is the file . bashrc located?
The . bashrc file is usually located in the /home/username directory.
What function does the .bash_profile file perform?
The function of the .bash_profile file is to provide login initialization commands.
What function does the .bash_logout file perform?
The function of the .bash_logout is to provide logout functions
What function does the .bashrc file perform?
The function of the .bashrc file is to provide shell configuration commands.

Wednesday 7 January 2015

Install SquirrelMail to configure web-based mail


Install SquirrelMail to configure web-based mail transfer system like yahoo mail or hotmail.
 
www.server.world
- SquirrelMail installed Web Server

 
mail.server.world
- SMTP/IMAP Server
[1]
[2]
[3]
[4]
[5] Install SquirrelMail.
# install from EPEL

[root@www ~]#
yum --enablerepo=epel -y install squirrelmail
[root@www ~]#
wget http://www.squirrelmail.org/plugins/compatibility-2.0.16-1.0.tar.gz -P /usr/share/squirrelmail/plugins

[root@www ~]#
wget http://www.squirrelmail.org/plugins/empty_trash-2.0-1.2.2.tar.gz -P /usr/share/squirrelmail/plugins

[root@www ~]#
wget http://www.squirrelmail.org/plugins/secure_login-1.4-1.2.8.tar.gz -P /usr/share/squirrelmail/plugins

[root@www ~]#
tar zxvf /usr/share/squirrelmail/plugins/compatibility-2.0.16-1.0.tar.gz -C /usr/share/squirrelmail/plugins

[root@www ~]#
tar zxvf /usr/share/squirrelmail/plugins/empty_trash-2.0-1.2.2.tar.gz -C /usr/share/squirrelmail/plugins

[root@www ~]#
tar zxvf /usr/share/squirrelmail/plugins/secure_login-1.4-1.2.8.tar.gz -C /usr/share/squirrelmail/plugins

[root@www ~]#
rm -f /usr/share/squirrelmail/plugins/*.tar.gz

# run setup script

[root@www ~]#
/usr/share/squirrelmail/config/conf.pl

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit
Command >>
1
 
# select

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Organization Preferences
1. Organization Name
: SquirrelMail

2. Organization Logo
: ../images/sm_logo.png

3. Org. Logo Width/Height
: (308/111)

4. Organization Title
: SquirrelMail

5. Signout Page
:

6. Top Frame
: _top

7. Provider link
: http://squirrelmail.org/

8. Provider name
: SquirrelMail
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
5
 
# change log-out page
When users click the Sign Out button they will be logged out and
then sent to signout_page. If signout_page is left empty,
(hit space and then return) they will be taken, as normal,
to the default and rather sparse SquirrelMail signout page.
[]:
/webmail
   
# change log-out page

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Organization Preferences
1. Organization Name
: SquirrelMail

2. Organization Logo
: ../images/sm_logo.png

3. Org. Logo Width/Height
: (308/111)

4. Organization Title
: SquirrelMail

5. Signout Page
: /webmail

6. Top Frame
: _top

7. Provider link
: http://squirrelmail.org/

8. Provider name
: SquirrelMail
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
r
 
# back to main menu

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit
Command >>
2
 
# select

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: localhost

2. Invert Time
: false

3. Sendmail or SMTP
: Sendmail
A. Update IMAP Settings
: localhost:143 (uw)

B. Change Sendmail Config
: /usr/sbin/sendmail
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
1
 
# change to your domain name
The domain name is the suffix at the end of all email addresses. If
for example, your email address is jdoe.com, then your domain
would be example.com.
[localhost]:
server.world
 
# input your domain name

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: Sendmail
A. Update IMAP Settings
: localhost:143 (uw)

B. Change Sendmail Config
: /usr/sbin/sendmail

R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
3
 
# select
You now need to choose the method that you will use for sending
messages in SquirrelMail. You can either connect to an SMTP server
or use sendmail directly.
1. Sendmail
2. SMTP
Your choice [1/2] [1]:
2
 
# change to SMTP

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
A. Update IMAP Settings
: localhost:143 (uw)

B. Change Sendmail Config
: localhost:25

R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
A
 
# select
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
IMAP Settings
--------------
4. IMAP Server
: localhost

5. IMAP Port
: 143

6. Authentication type
: login

7. Secure IMAP (TLS)
: false

8. Server software
: uw

9. Delimiter
: /
B. Update SMTP Settings
: localhost:25

H. Hide IMAP Server Settings
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
4
 
# select
This is the hostname where your IMAP server can be contacted.
[localhost]:
mail.server.world
 
# specify your IMAP server

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
IMAP Settings
--------------
4. IMAP Server
: mail.server.world

5. IMAP Port
: 143

6. Authentication type
: login

7. Secure IMAP (TLS)
: false

8. Server software
: uw

9. Delimiter
: /
B. Update SMTP Settings
: localhost:25

H. Hide IMAP Server Settings
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
8
 
# select
Each IMAP server has its own quirks. As much as we tried to stick
to standards, it doesn't help much if the IMAP server doesn't follow
the same principles. We have made some work-arounds for some of
these servers. If you would like to use them, please select your
IMAP server. If you do not wish to use these work-arounds, you can
set this to "other", and none will be used.
   bincimap
= Binc IMAP server

   courier
= Courier IMAP server

   cyrus
= Cyrus IMAP server

   dovecot
= Dovecot Secure IMAP server

   exchange
= Microsoft Exchange IMAP server

   hmailserver
= hMailServer

   macosx
= Mac OS X Mailserver

   mercury32
= Mercury/32

   uw
= University of Washington's IMAP server

   gmail
= IMAP access to Google mail (Gmail) accounts

   other
= Not one of the above servers

[uw]:
dovecot
 
# select Dovecot

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
IMAP Settings
--------------
4. IMAP Server
: mail.server.world

5. IMAP Port
: 143

6. Authentication type
: login

7. Secure IMAP (TLS)
: false

8. Server software
: dovecot

9. Delimiter
: /
B. Update SMTP Settings
: localhost:25

H. Hide IMAP Server Settings
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
9
 
# select
This is the delimiter that your IMAP server uses to distinguish between
folders. For example, Cyrus uses '.' as the delimiter and a complete
folder would look like 'INBOX.Friends.Bob', while UW uses '/' and would
look like 'INBOX/Friends/Bob'. Normally this should be left at 'detect'
but if you are sure you know what delimiter your server uses, you can
specify it here.
To have it autodetect the delimiter, set it to 'detect'.
[/]:
detect
 
# specify detect

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
IMAP Settings
--------------
4. IMAP Server
: mail.server.world

5. IMAP Port
: 143

6. Authentication type
: login

7. Secure IMAP (TLS)
: false

8. Server software
: dovecot

9. Delimiter
: detect
B. Update SMTP Settings
: localhost:25

H. Hide IMAP Server Settings
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
B
 
# select
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
SMTP Settings
-------------
4. SMTP Server
: localhost

5. SMTP Port
: 25

6. POP before SMTP
: false

7. SMTP Authentication
: none

8. Secure SMTP (TLS)
: false

9. Header encryption key
:
A. Update IMAP Settings
: mail.server.world:143 (dovecot)

H. Hide SMTP Settings
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
4
 
# select
This is the hostname of your SMTP server.
[localhost]:
mail.server.world
 
# specify SMTP server

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
SMTP Settings
-------------
4. SMTP Server
: mail.server.world

5. SMTP Port
: 25

6. POP before SMTP
: false

7. SMTP Authentication
: none

8. Secure SMTP (TLS)
: false

9. Header encryption key
:
A. Update IMAP Settings
: mail.server.world:143 (dovecot)

H. Hide SMTP Settings
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
7
 
# select
If you have already set the hostname and port number, I can try to
automatically detect the mechanisms your SMTP server supports.
Auto-detection is *optional* - you can safely say "n" here.
Try to detect auth mechanisms? [y/N]:
y
 
# yes (auto)

Trying to detect supported methods (SMTP)...
Testing none: SUPPORTED
Testing login: SUPPORTED
Testing CRAM-MD5: NOT SUPPORTED
Testing DIGEST-MD5: NOT SUPPORTED
What authentication mechanism do you want to use for SMTP connections?
none - Your SMTP server does not require authorization.
login - Plaintext. If you can do better, you probably should.
cram-md5 - Slightly better than plaintext.
digest-md5 - Privacy protection - better than cram-md5.
*** YOUR SMTP SERVER MUST SUPPORT THE MECHANISM YOU CHOOSE HERE ***
If you don't understand or are unsure, you probably want "none"
none, login, cram-md5, or digest-md5 [none]:
login
 
# select login

SMTP authentication uses IMAP username and password by default.
Would you like to use other login and password for all SquirrelMail
SMTP connections? [y/N]:
n

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain
: server.world

2. Invert Time
: false

3. Sendmail or SMTP
: SMTP
SMTP Settings
-------------
4. SMTP Server
: mail.server.world

5. SMTP Port
: 25

6. POP before SMTP
: false

7. SMTP Authentication
: login (with IMAP username and password)

8. Secure SMTP (TLS)
: false

9. Header encryption key
:
A. Update IMAP Settings
: mail.server.world:143 (dovecot)

H. Hide SMTP Settings
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
r
 
# back to main menu

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit
Command >>
10
 
# select

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language
: en_US

2. Default Charset
: iso-8859-1

3. Enable lossy encoding
: falsev
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
1
 
# select
SquirrelMail attempts to set the language in many ways. If it
can not figure it out in another way, it will default to this
language. Please use the code for the desired language.
[en_US]:
ja_JP
 
# specify your lang

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language
: ja_JP

2. Default Charset
: iso-8859-1

3. Enable lossy encoding
: false
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
2
 
# select

This option controls what character set is used when sending
mail and when sending HTML to the browser.
This option is used only when default language is 'en_US'.
[iso-8859-1]:
iso-2022-jp
 
# specify your lang

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language
: ja_JP

2. Default Charset
: iso-2022-jp

3. Enable lossy encoding
: false

R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
r
 
# back to main menu

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit
Command >>
4
 
# select

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory
: /var/lib/squirrelmail/prefs/

2. Attachment Directory
: /var/spool/squirrelmail/attach/

3. Directory Hash Level
: 0

4. Default Left Size
: 150

5. Usernames in Lowercase
: false

6. Allow use of priority
: true

7. Hide SM attributions
: false

8. Allow use of receipts
: true

9. Allow editing of identity
: true

Allow editing of name
: true

Remove username from header
: false

10. Allow server thread sort
: true

11. Allow server-side sorting
: true

12. Allow server charset search
: true

13. Enable UID support
: true

14. PHP session name
: SQMSESSID

15. Location base
:
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
7
 
# select

Hide SM attributions (y/n) [n]:
y
 
# Yes

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory
: /var/lib/squirrelmail/prefs/

2. Attachment Directory
: /var/spool/squirrelmail/attach/

3. Directory Hash Level
: 0

4. Default Left Size
: 150

5. Usernames in Lowercase
: false

6. Allow use of priority
: true

7. Hide SM attributions
: true

8. Allow use of receipts
: true

9. Allow editing of identity
: true

Allow editing of name
: true

Remove username from header
: false

10. Allow server thread sort
: true

11. Allow server-side sorting
: true

12. Allow server charset search
: true

13. Enable UID support
: true

14. PHP session name
: SQMSESSID

15. Location base
:
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
r
 
# back to main menu

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit
Command >>
8
 
# select

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. delete_move_next
2. squirrelspell
3. newmail
Available Plugins:
4. listcommands
5. filters
6. fortune
7. mail_fetch
8. message_details
9. compatibility
10. calendar
11. translate
12. sent_subfolders
13. empty_trash
14. spamcop
15. bug_report
16. abook_take
17. info
18. secure_login
19. administrator
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
9
 
# add compatibility (number is different at an env)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. delete_move_next
2. squirrelspell
3. newmail
4. compatibility
Available Plugins:
5. listcommands
6. filters
7. fortune
8. mail_fetch
9. message_details
10. calendar
11. translate
12. sent_subfolders
13. empty_trash
14. spamcop
15. bug_report
16. abook_take
17. info
18. secure_login
19. administrator
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
13
 
# add empty_trash (number is different at an env)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. delete_move_next
2. squirrelspell
3. newmail
4. compatibility
5. empty_trash
Available Plugins:
6. listcommands
7. filters
8. fortune
9. mail_fetch
10. message_details
11. calendar
12. translate
13. sent_subfolders
14. spamcop
15. bug_report
16. abook_take
17. info
18. secure_login
19. administrator
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
18
 
# add secure_login (number is different at an env)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. delete_move_next
2. squirrelspell
3. newmail
4. compatibility
5. empty_trash
6. secure_login
Available Plugins:
7. listcommands
8. filters
9. fortune
10. mail_fetch
11. message_details
12. calendar
13. translate
14. sent_subfolders
15. spamcop
16. bug_report
17. abook_take
18. info
19. administrator
R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >>
q
 
# quit
You have not saved your data.
Save? [Y/n]:
y
 
# save

Data saved in config.php
Exiting conf.pl.
You might want to test your configuration by browsing to
http://your-squirrelmail-location/src/configtest.php
Happy SquirrelMailing!
[root@www ~]#
cp /usr/share/squirrelmail/plugins/secure_login/config.sample.php /usr/share/squirrelmail/plugins/secure_login/config.php

[root@www ~]#
vi /usr/share/squirrelmail/plugins/secure_login/config.php
# line 24: change (continue to connect with SSL after login)

$change_back_to_http_after_login =
0
;
[root@www ~]#
/etc/rc.d/init.d/httpd reload

Reloading httpd:     [  OK  ]
[6] Access to 'http://(your server's name or IP address/)/webmail/', then follwing sacreen is shown, authenticate your user name and password to login.
[7] Just logined.