Practical - 7 :- How to install printers?

How to install printers?

Equipment: - 

  1. Printer
  2. PC with lattes t configuration

Row Material: - Driver of Printer CD

Procedure- 

Plug in the printer's power cable and make sure it's turned on.


Connect the included cable (usually a USB cable) from the printer to the computer. Note: The process will be different if you're using a wireless printer; we'll talk more about that later on.


On your computer, locate the Printer settings. If you're using a Windows computer, you'll find these in the Control Panel. If you're using a Mac, you'll find them in System Preferences.


Look for the option to Add a printer, then follow the instructions that appear.

Now it's time to try printing something! For example, you could try printing this test page. After you click the link, select File > Print from your web browser's menu, or simply press Ctrl+P on your keyboard (or Command+P if you're on a Mac).

A dialog box will appear. Locate and select the new printer from the list, then click Print.



The item will then be printed. But if it doesn't work, don't panic! You can try using some of the solutions to common problems below.


OR  Also Follow This Procedure To  Install  Printer

STEP 1: COMPUTER PROPERTIES

  • Go to Start.
  • Right Mouse click Computer.
  • Click Properties.

STEP 2: DETERMINE SYSTEM TYPE

  • Check whether your computer has a 32‐bit or 64‐bit operating system.

STEP 1: DEVICES AND PRINTERS

  • Go to Start > Devices and Printers.
  • Click Add a printer.

STEP 2: ADD PRINTER

  • Click Add a network, wireless or Bluetooth printer.

STEP 3: SEARCH DIFFERENTLY

  • Click The printer that I want isn’t listed.

STEP 4: SEARCH THE DESIRED PRINTER

  • Select Browse for a printer.
  • Click Next. 
STEP 5: SELECT PRINT SERVER
  • After Printer type the print server: 
  •  For 64‐bit operating systems type \\UTPRINT1.AD.UTWENTE.NL
  • For 32‐bit operating systems type  \\UTPRINT2.AD.UTWENTE.NL.
  • Press enter.

STEP 6: FILL IN CREDENTIALS

  • Fill in your domain account credentials:
  • Domain\username (e.g. ad\vvangoch)
  • The corresponding password.
  • If deserved check Remember my credentials.
  • Click OK.

STEP 7: SELECT PRINTER

  • Select the desired printer.
  • Click Select. 

STEP 8: FINISH

  • Click Next.
  • Click Finish

Practical - 6:- File System in Linux

 AIM :-  File System  in Linux

Equipment :-   PC with Latest Linux OS

  

Theory :-  Have you wondered why certain programs are located under /bin, or /sbin, or /usr/bin, or /usr/sbin?For example, less command is located under /usr/bin directory. Why not /bin, or /sbin, or /usr/sbin? What is the different between all these directories?In this practical, let us review the Linux filesystem structures and understand the meaning of individual high‐level directories.

 

1. / – Root  

Every single file and directory starts from the root directory.

  • Only root user has write privilege under this directory.
  • Please note that /root is root user’s home directory, which is not same as /.

 2. /bin – User Binaries  

  • Contains binary executables.
  • Common linux commands you need to use in single‐user modes are located
  • under this directory.  Commands used by all the users of the system are located here.
  •  For example: ps, ls, ping, grep, cp.

 

3. /sbin – System Binaries  

  • Just like /bin, /sbin also contain binary executables.
  • But, the linux commands located under this directory are used typically by system administrator, for system maintenance purpose.  
  • For example: iptables, reboot, fdisk, ifconfig, swapon

 

4. /etc – Configuration File

  • Contains configuration files required by all programs.
  • This also contains startup and shutdown shell scripts used to start/stop individual programs.
  • For example: /etc/resolv.conf, /etc/logrotate.conf
  •  

5. /dev – Device Files

  • Contains device files.
  • These include terminal devices, usb, or any device attached to the system.
  • For example: /dev/tty1, /dev/usbmon0

 

6. /proc – Process Information

  • Contains information about system process
  • This is a pseudo filesystem contains information about running process. For example: /proc/{pid} directory contains information about the process with that particular pid.
  • This is a virtual filesystem with text information about system resources. For example: /proc/uptime

 

7. /var – Variable Files

  • var stands for variable files
  • Content of the files that are expected to grow can be found under this directory.
  • This includes — system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp);

 

8. /tmp – Temporary Files

  • Directory that contains temporary files created by system and users.  
  • Files under this directory are deleted when system is rebooted.

 

9. /usr – User Programs

  • Contains binaries, libraries, documentation, and source‐code for second level programs.
  •  /usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look under /usr/bin. For example: at, awk, cc, less, scp
  •  /usr/sbin contains binary files for system administrators. If you can’t find a system binary under /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel
  • /usr/lib contains libraries for /usr/bin and /usr/sbin
  • /usr/local contains users programs that you install from source. For example, when you install apache from source, it goes under /usr/local/apache2

 

10. /home –

  • Home Directories  Home directories for all users to store their personal files.
  • For example: /home/john, /home/nikita

 

11. /boot – Boot Loader Files

  •  Contains boot loader related files.  
  • Kernel initrd, vmlinux, grub files are located under /boot  
  • For example: initrd.img‐2.6.32‐24‐generic, vmlinuz‐2.6.32‐24‐generic

 

12. /lib – System Libraries

 

  • Contains library files that supports the binaries located under /bin and /sbin
  •  Library filenames are either ld* or lib*.so.*
  •  For example: ld‐2.11.1.so, libncurses.so.5.7

 

13. /opt – Optional add‐on Applications

 

  • opt stands for optional.  
  • Contains add‐on applications from individual vendors.
  • add‐on applications should be installed under either /opt/ or /opt/ sub‐ directory.
 

14. /mnt – Mount Directory

  • Temporary mount directory where sysadmins can mount filesystems

 

15. /media – Removable Media Devices

  • Temporary mount directory for removable devices.  
  • For examples, /media/cdrom for CD‐ROM; /media/floppy for floppy drives; /media/cdrecorder for CD writer

 

16. /srv – Service Data.

  • srv stands for service.  
  • Contains server specific services related data.
  •  For example, /srv/cvs contains CVS related data.

Practical - 5 :- Backup your Linux box using the Scripts

Equipment:- PC with latest configuration

Row material: -    

back up tool ie. CD/ HDD /DVD 

software DVDs

Theory :-  A backup is a copy of the information in a database, held in some physically separate location from your database. If the database becomes unavailable, perhaps because of damage to a disk drive, you can restore it from the backup. Depending on the nature of the damage, it is often possible to restore from backups all committed changes to the database up to the time it became unavailable.

 

Step 1: Create an IBackup online account


Step 2: Download the script bundle

  • The archive needs to be downloaded and extracted into a particular folder on your Linux box.
  • Download the idevsutil command line utility (32 bit/64 bit) and place it inside the script folder (extracted folder).

Step 3: Provide appropriate permissions (executable permission) to the scripts and command line utility 

Example: chmod a+x *.pl and chmod a+x idevsutil


Step 4: Configuration file setting for backup / restore

We have provided "CONFIGURATION_FILE" along with the download bundle. Following are the parameters that you need to set:


Step 5: Login to your IBackup account

After you have set the parameters for the Configuration File, run the below command:

 $./login.pl


Step 6: Schedule the backup job After setting the configuration file (as detailed above), run the below command:

 $./Scheduler_Script.pl

 Choose the desired scheduled date / time for the backup job. The backup job will automatically start at the scheduled time.

You can even perform manual backup using the below command:

$./Backup_Script.pl


Step 7: View backup/restore progress

To view the progress details during backup or restore, run the below command $./Status_Retrieval_Script.pl


Step 8: Schedule the restore job You can schedule your Restore jobs too.

After setting the configuration file (as detailed above), run the below command:

 $./Scheduler_Script.pl


Step 9: Stop ongoing Backup/restore operations

To stop an ongoing backup job, a restore job, or both, run the following command: $./Job_Termination_Script.pl


Step 10: View the backup / restore logs You can view the backup / restore log files that are present in the ./LOGS folder.


Step 11: Logout from your IBackup account To end the session, run the below command:

 $./logout.p

 

Key Points While Performing Steps

After extraction of the zip archive, you will find following files in the folder:

a. login.pl                                            b. Backup_Script.pl

c. Restore_Script.pl                            d. Scheduler_Script.pl

e. Job_Termination_Script.pl             f. Status_Retrieval_Script.pl

g. header.pl                                         h. logout.pl

i. CONFIGURATION_FILE              j. BackupsetFile.txt

k. RestoresetFile.txt                            l. ExcludeList.txt

 

Note: For more information, verify the sample configuration and other supported files provided along with the download bundle.

The login script is a mandatory script to be executed before performing any Backup/Restore operation. It will create a secure session for the IBackup account mentioned in the configuration file. This script will also replace the PASSWORD and the PVTKEY values in the configuration file with dummy values once the login is successful. This way your IBackup credentials will not be visible to anyone while you use your IBackup account.  

Note: This is the IBackup Authentication script to create a secure session for enhanced security.

Choose the desired scheduled date / time for the restore job. The restore job will automatically start at the scheduled time. You can even perform manual restore using the below command: $./Restore_Script.pl

To keep your IBackup account safe, logout of the secure session (optional). This script will clear the PASSWORD and PVTKEY fields in the CONFIGURATION_FILE ensuring your IBackup credentials cannot be viewed by others. After logout, you need to login again to perform any other operations.

 

Practical -4 :- How to install software in red hat Linux

Aim :-  How to install software in red hat Linux


Equipment: - PC with latest configuration

Raw Material:- CD/ DVD of software


Theory :- 

Red Hat is the basis of PC, Linux OS, Mandriva and Fedora. If your distro doesn't include all the software you want, you can install additional software from the internet (whether you have broadband or dial‐up) or removable media. This can be accomplished graphically or using the command line.

Steps :- 

  1. Understand that in Linux, software is bundled in packages which can be downloaded from repositories (repos).1T 1TInstallation tools are called package managers which automatically resolve dependencies on other software libraries. 
  2. Now for the command line.1T 1TOpen a root shell/terminal. 
  3. Type the root password. 
  4. To update the package lists type yum check‐update 
  5. Type yum install "program name"
  6. For example, to install the Dillo web browser, you would type1T 1T34yum install dillo34T. Confirm by pressing Y. You're done!

Practical -3 :- Creating a User Account

Linux Create User | Linux Add user | Linux user add command

The Linux server allows us to create more than one user after installation. Linux is a Multi-user system, which means more than one user can work in the same system at the same time. We are allowed to do so through the Setup agent.

We must have to create an account in order to work with Linux

as we cannot keep working with the root account. We have one administrative account; a system administrator account is responsible for managing the user accounts and groups of the system.

Adding or removing a user is one of the most basic tasks of a new Linux server.

We are given only a root user account by a new Linux server. Adding a user account provides lots of power and accessibility to a particular user. It is a useful but insecure utility of the Linux server. It is good to add an unprivileged user to do common tasks. However, we can access the administrative privilege through sudo command-line utility.


Create User in Linux (Ubuntu)

There are two most common ways to add a user to a Linux server.

  • Graphically through user manager
  • By the user add command (Terminal)

1. By Graphically through user manager

Linux GUI

allows us to create a user from its functions. It is a straight forward process. To create a user to your Linux server, follow the below steps:

  1. Step1: Goto system search and search for the setting and navigate to Detail-> About. 
  2. Step2: Click on the Users after that Unlock option given on the header. It will ask for the system security password to enter the password and click ok to continue. Consider the below image:

  3. Step3: Click on the Add User option to add a new user. 

  4. Step4: Enter the user details like username and password and account type. We can create two types of accounts, which are Standard and Administrator. The standard account does not contain the sudo privilege. However, we can provide it later.

  5. Step5: Now, we have successfully created a new user called JTP2. Consider the below image.

2. By the Linux user add command

In Linux, user add command is a command-line utility which is used to add or remove a user on a Linux server and Unix based operating system.

In a different type of Linux distribution, the user add command may be slightly different.

The useradd command performs the below tasks:

  • It edits the files for newly created user like /etc/passwd, /etc/shadow, /etc/group and /etc/g shadow.
  • It creates and opens a new home directory.
  • It allows us to set ownerships and permissions to the home directory.


Syntax:


1.     useradd [options] username  

In order to use the useradd command, we have to log-in with root or sudo access.

Before using Linux useradd command, let's understand some common terms that are used in the Linux command line.

  • Username: A username is a name that is used to login to the Linux system. It is displayed when we turn on our machine. The username length should be between 1 to 32 characters.

Password: A password is a secret code that is used to protect your system from unauthorized access. It is stored in etc/shadow file in an encrypted format.

User ID (UID): Linux provide a unique Id to every user; it is called user identification number or User ID or UID. By default, the UID for the root user is reserved as zero, and the remaining UID from 1 to 99 is reserved for other predefined accounts. Further, UID's from 100-999 are reserved for groups and system accounts.

Group ID (GID): The GID or Group ID is a group identification number provided by the Linux system. It is stored in /etc/group file.

User Info: It allows us to define some additional information about the user, such as user full name. It is optional.

Home Directory: It is an absolute location for a user.

Shell: It is an absolute location of a user's shell i.e. /bin/bash.

To create a new user by useradd command, execute the useradd command followed by username as follows:

 

1.     sudo useradd  ICTSM - U1 

The above command will ask for the system administration password, enter the password. It will create a user named as ICTSM - U1. This username is used by the user to login the system. The username must be unique. Consider the below output:


To set the password for the newly created user, execute the below command:

 1.     sudo passwd ICTSM - U1 

The above command will ask for the new password, enter the password and retype the new password. It will update the password for the specified user. Consider the below output:


Create a user with a home directory

Sometimes the newly created user may or may not assign a home directory. To create a user and to forcefully assign a home directory to it, execute the below command:

 1.     sudo useradd -m Demo  

Consider the below snap of terminal:


The above command will ask for the system administration password and create a directory home/Demo for the user Demo.

Create a user with a different home directory

Linux allows us to create a home directory on a different place instead of the default folder. Use the -d option with useradd command to create a different home directory. Execute the below command:

 

1.     sudo useradd -m -d /Demo1 Demo1  

The above command will create a Demo1 folder under the root directory for the user Demo1. Consider the below snap of the terminal:


Create a user with an expiry date

To create a user with an expiry date that means after a particular date, it will be auto-deleted.

sudo useradd -d /home/test -e 2020-03-16 Demo2  

The above command will create a user with a specified expiry date. It will create a user named Demo2, which will be auto-deleted after 16 March 2020. Consider the below snap of the terminal:


It will be useful when you want to create an account for any user who is going to depart after a short period.

  





Practical - 2 :- Preparing functional system in linux

 AIM :- Preparing functional system in linux

Equipment :- PC with Latest Configurations

Raw Material :-   Software CD’s and    Components to Add

To enjoy your new Linux installation forever without any worries, it is important to take a few simple precautions. You must do these as soon as you complete installing Linux on your machine for the first time.

  • Accept the Red Hat License agreement and click ‘Forward.
  • The next step is regarding the configuration of the Firewall. You can Enable or Disable  the firewall according to your preferences and then click ‘Forward’.
  • Next step is about the configuration of another security tool‐ SE Linux. By default you  should keep it ‘Disabled’ unless you’re working with very secure information.  
  • You can also choose to configure the Kdump, that stores information about system crashes if your system fails but uses valuable disk space. By default don’t enable it.  
  • Next, adjust the time and date settings, and then click ‘Forward’.
  • The next step is for software updates from Red Hat, at this point you should skip the registration and register at a later time and then click ‘Forward’
  • This step is to create a non‐admin user for the system. Enter the details and click ‘Forward’.  
  • This step is about configuration of your Sound Card, choose a sound device and then click ‘Forward’.  
  • Click ‘Forward’ to complete the configurations and start using your Red Hat Linux OS.