<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ihitc.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Chapter_10_Study_Guide</id>
	<title>Chapter 10 Study Guide - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ihitc.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Chapter_10_Study_Guide"/>
	<link rel="alternate" type="text/html" href="https://wiki.ihitc.net/mediawiki/index.php?title=Chapter_10_Study_Guide&amp;action=history"/>
	<updated>2026-04-30T15:30:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.5</generator>
	<entry>
		<id>https://wiki.ihitc.net/mediawiki/index.php?title=Chapter_10_Study_Guide&amp;diff=5425&amp;oldid=prev</id>
		<title>Hess0060: Created page with &quot;==Printer Administration== :*&#039;&#039;&#039;Common UNIX Printing System&#039;&#039;&#039; (CUPS) is a printing system used by Linux computers.  :*Information that will be sent to a printer is called a prin...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ihitc.net/mediawiki/index.php?title=Chapter_10_Study_Guide&amp;diff=5425&amp;oldid=prev"/>
		<updated>2012-03-26T13:52:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Printer Administration== :*&amp;#039;&amp;#039;&amp;#039;Common UNIX Printing System&amp;#039;&amp;#039;&amp;#039; (CUPS) is a printing system used by Linux computers.  :*Information that will be sent to a printer is called a prin...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Printer Administration==&lt;br /&gt;
:*&amp;#039;&amp;#039;&amp;#039;Common UNIX Printing System&amp;#039;&amp;#039;&amp;#039; (CUPS) is a printing system used by Linux computers. &lt;br /&gt;
:*Information that will be sent to a printer is called a print job.&lt;br /&gt;
:*The &amp;#039;&amp;#039;&amp;#039;lp&amp;#039;&amp;#039;&amp;#039; command is used to specify and print the print job. &lt;br /&gt;
:*To check the status of a printer(s) the &amp;#039;&amp;#039;&amp;#039;lpstat&amp;#039;&amp;#039;&amp;#039; command is used.&lt;br /&gt;
:*The cups daemon (cupsd) will assign all print jobs a unique print job &lt;br /&gt;
::ID and put them in the print queue.&lt;br /&gt;
:*The print queue is a special temporary directory where the print jobs are&lt;br /&gt;
::stored before being sent to the printer. &lt;br /&gt;
:*The path of the queue is usually &amp;#039;&amp;#039;&amp;#039;/var/spool/cups&amp;#039;&amp;#039;&amp;#039; on most Linux systems. &lt;br /&gt;
:*If the printer is accepting print jobs,the cupsd will put the print job in to the queue.&lt;br /&gt;
:*This is called spooling or queuing.&lt;br /&gt;
:*Adding the –t option shows all the printers and there statuses on the system.&lt;br /&gt;
&lt;br /&gt;
::kevin@kubuntu1:~$ lpstat -t&lt;br /&gt;
::scheduler is running&lt;br /&gt;
::system default destination: Samsung-ML-2152W&lt;br /&gt;
::device for Samsung-ML-2152W: smb:///192.168.0.195&lt;br /&gt;
::Samsung-ML-2152W accepting requests since Tue 17 Jan 2012 11:25:40 PM CST&lt;br /&gt;
::printer Samsung-ML-2152W is idle. enabled since Tue 17 Jan 2012 11:25:40 PM&lt;br /&gt;
::CST&lt;br /&gt;
::kevin@kubuntu1:~$&lt;br /&gt;
:*To manipulate the status of a printer by using the cupsaccept, cupsreject,&lt;br /&gt;
::cupsenable, or cupsdisable commands.&lt;br /&gt;
::kevin@kubuntu1:~$ cupsaccept Samsung-ML-2152W&lt;br /&gt;
::kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W&lt;br /&gt;
::kevin@kubuntu1:~$ lpstat -t&lt;br /&gt;
::scheduler is running&lt;br /&gt;
::system default destination: Samsung-ML-2152W&lt;br /&gt;
::device for Samsung-ML-2152W: smb:///192.168.0.195&lt;br /&gt;
::Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT&lt;br /&gt;
::printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT -&lt;br /&gt;
::Paused&lt;br /&gt;
::kevin@kubuntu1:~$&lt;br /&gt;
:*The –r option is used to give a reason why the printer’s status is set as&lt;br /&gt;
::such.&lt;br /&gt;
::kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W -r &amp;quot;OMG the printer is on fire&amp;quot;&lt;br /&gt;
::Samsung-ML-2152W&lt;br /&gt;
::kevin@kubuntu1:~$ lpstat -t&lt;br /&gt;
::scheduler is running&lt;br /&gt;
::system default destination: Samsung-ML-2152W&lt;br /&gt;
::device for Samsung-ML-2152W: smb:///192.168.0.195&lt;br /&gt;
::Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT&lt;br /&gt;
::printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT -&lt;br /&gt;
::OMG the printer is on fire&lt;br /&gt;
::kevin@kubuntu1:/$&lt;br /&gt;
:*Use the lp command to print.&lt;br /&gt;
::kevin@kubuntu1:/$ lp -d Samsung-ML-2152W /home/kevin/Documents/reports&lt;br /&gt;
::request id is Samsung-ML-2152W-2 (1 file(s))&lt;br /&gt;
::kevin@kubuntu1:/$&lt;br /&gt;
:*Other options can be added to the lp command as shown.&lt;br /&gt;
&lt;br /&gt;
         &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Options&lt;br /&gt;
!Function&lt;br /&gt;
|-&lt;br /&gt;
|−i&lt;br /&gt;
|Print job ID Specifies a certain print job ID to modify&lt;br /&gt;
|-&lt;br /&gt;
|−d&lt;br /&gt;
|printername, Specifies the name of the printer to send the print job to&lt;br /&gt;
|-&lt;br /&gt;
|−n&lt;br /&gt;
|Number Prints a certain number of copies, where number can be any number&lt;br /&gt;
|-&lt;br /&gt;
|−m&lt;br /&gt;
|Mails you confirmation of print job completion&lt;br /&gt;
|-&lt;br /&gt;
| −o&lt;br /&gt;
| option Specifies certain printing options. Common printing options include the following:&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:*cpi=number—Specifies the number of characters per inch, where number is the number of characters.&lt;br /&gt;
:*landscape—Prints in landscape orientation&lt;br /&gt;
:*number-up=number—Prints the number of pages on a single&lt;br /&gt;
:*page, where number is 1, 2, or 4&lt;br /&gt;
:*sides=string—Sets double-sided printing, where string is&lt;br /&gt;
::either ”&amp;#039;&amp;#039;&amp;#039;two-sided-short-edge&amp;#039;&amp;#039;&amp;#039;” or ”&amp;#039;&amp;#039;&amp;#039;two-sided-long-edge&amp;#039;&amp;#039;&amp;#039;”&lt;br /&gt;
&lt;br /&gt;
:*To print a list of all users logged in, pipe the who command to the &amp;#039;&amp;#039;&amp;#039;lp&amp;#039;&amp;#039;&amp;#039; command.&lt;br /&gt;
:kevin@kubuntu1:/$ who | lp -d Samsung-ML-2152W&lt;br /&gt;
:request id is Samsung-ML-2152W-4 (0 file(s))&lt;br /&gt;
:kevin@kubuntu1:/$&lt;br /&gt;
:*To remove all print jobs from a specific user, add the &amp;#039;&amp;#039;&amp;#039;–u&amp;#039;&amp;#039; &amp;lt;username&amp;gt; before&lt;br /&gt;
::the cancel command. To remove all print jobs use the –a as shown.&lt;br /&gt;
::kevin@kubuntu1:/$ &amp;#039;&amp;#039;&amp;#039;cancel -a&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
::kevin@kubuntu1:/$ lpstat&lt;br /&gt;
::kevin@kubuntu1:/$&lt;br /&gt;
:*The Line Printer Daemon (LPD) is an alternative to CUPS, that is used by older&lt;br /&gt;
::Linux systems. &lt;br /&gt;
:*The &amp;#039;&amp;#039;&amp;#039;LPD&amp;#039;&amp;#039;&amp;#039; commands can be used in CUPS.&lt;br /&gt;
:*LPR command = print documents&lt;br /&gt;
:*LPC command = view printer status&lt;br /&gt;
:*LPQ command = see jobs in the queue&lt;br /&gt;
:*LPRM command =remove job form queue&lt;br /&gt;
:*You can find the cupsd configuration file in the /etc/cups/cupsd.conf directory. &lt;br /&gt;
:*The /etc/cups/printers.conf contains settings about the specific printer.&lt;br /&gt;
:*The command system-config-printer will launch a GUI-based program; the Printer Configuration tool. &lt;br /&gt;
:*This program lets you add printers with Plug and Play&lt;br /&gt;
::(PnP) or specify the Uniform Resource Identifier (URI). Hewlett-Packard &lt;br /&gt;
::JetDirect, Internet Printing Protocol (IPP), Line Printer Daemon (LPD or&lt;br /&gt;
::Windows (SAMBA) allows you to print to a printer across the network. From the&lt;br /&gt;
::Printer Configuration tool you are also able to give users and groups&lt;br /&gt;
:*permission to print to specific printers.&lt;br /&gt;
:*You can use CUPS to administer and remotely administer printes through a web browser. &lt;br /&gt;
:*To open the CUPS web-based control panel, navigate to http://servername:631.&lt;br /&gt;
&lt;br /&gt;
==Log File Administration==&lt;br /&gt;
&lt;br /&gt;
*For identifying and troubleshooting problems on a Linux System&lt;br /&gt;
*Called  log files most Daemons record information and error messages to files stored on the file system.&lt;br /&gt;
*Typically stored in the /var/log directory&lt;br /&gt;
::*&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039; /var/log/samba contains log files created by the samba file-sharing daemons&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Linux log files found in /var/log&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! logs&lt;br /&gt;
! description &lt;br /&gt;
|-&lt;br /&gt;
| boot.log&lt;br /&gt;
| Contains basic information regarding daemon startup obtained during system initialization&lt;br /&gt;
|-&lt;br /&gt;
|cron&lt;br /&gt;
|Contains information and error messages generated by the cron and at daemons&lt;br /&gt;
|-&lt;br /&gt;
| dmesg&lt;br /&gt;
| Contains detected hardware information obtained during system startup.&lt;br /&gt;
|-&lt;br /&gt;
| maillog&lt;br /&gt;
| Contains information and error messages generated by the sendmail daemon.&lt;br /&gt;
|-&lt;br /&gt;
| secure&lt;br /&gt;
| Contains information and error messages regarding network access generated by daemons such as sshd and xinetd.&lt;br /&gt;
|-&lt;br /&gt;
| wtmp&lt;br /&gt;
| Contains a history of all login sessions.&lt;br /&gt;
|-&lt;br /&gt;
| rpmpkgs yum.log&lt;br /&gt;
| Contains a list of packages installed by the Red Hat Package Manager and related error messages.&lt;br /&gt;
|-&lt;br /&gt;
| xferlog &lt;br /&gt;
| Contains information and error messages generated by the FTP daemon.&lt;br /&gt;
|-&lt;br /&gt;
| Xorg.0.log XFree86&lt;br /&gt;
| Contains information and error messages generated by X Windows.&lt;br /&gt;
|-&lt;br /&gt;
| lastlog&lt;br /&gt;
| Contains a list of users and their last login time; must be viewed using the lastlog command.&lt;br /&gt;
|-&lt;br /&gt;
| messages &lt;br /&gt;
| Contains detailed information regarding daemon startup obtained at system initialization as well as important system messages produced after system initialization&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===System Log Daemon===&lt;br /&gt;
*logging of most events is handled centrally in Linux in the System Log Deamon&lt;br /&gt;
*When the daemon is started on the system &lt;br /&gt;
::*Creates a socket /dev/log&lt;br /&gt;
::*This is for other system processes to write to&lt;br /&gt;
::*It then reads any information written to this socket and saves it to the appropriate log file according to :::/etc/rsyslog.conf&lt;br /&gt;
::*To view use cat /etc/rsyslog.conf&lt;br /&gt;
&lt;br /&gt;
*Sample output showing the &amp;#039;&amp;#039;&amp;#039;Facility,&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;Priority&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Location&amp;#039;&amp;#039;&amp;#039; of the &amp;#039;&amp;#039;&amp;#039;/etc/rsyslog.conf&amp;#039;&amp;#039;&amp;#039; file&lt;br /&gt;
:::news.=crit /var/log/news/news.crit&lt;br /&gt;
:::Facility: &amp;quot;news.&amp;quot;&lt;br /&gt;
:::The area of the system to listen to and log&lt;br /&gt;
::::Priority: &amp;quot;=crit&amp;quot;&lt;br /&gt;
:::::The importance of the information being logged&lt;br /&gt;
::::Location: /var/log/news/news.crit&lt;br /&gt;
:::::The location and path of the log file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Examples of kernel log facilities with differing priorities&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! kernel logs&lt;br /&gt;
! function&lt;br /&gt;
|-&lt;br /&gt;
| kern.warning   /var/log/logfile&lt;br /&gt;
| logs warning messages and those with more serious priorities to the &amp;#039;&amp;#039;&amp;#039;/var/log/logfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| kern.=warning   /var/log/logfile&lt;br /&gt;
| logs just the warning messages to the &amp;#039;&amp;#039;&amp;#039;/var/log/logfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| kern.* /var/log/logfile&lt;br /&gt;
| logs all error messages to the &amp;#039;&amp;#039;&amp;#039;/var/log/logfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| \*.=warn;kern.none   /var/log/logfile&lt;br /&gt;
| logs all warnings from all facilities except the kernel to the /var/log/logfile&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
::*logs all but the warning priority messages to /var/log/logfile&lt;br /&gt;
::*\*.=warn;kern.none   /var/log/logfile&lt;br /&gt;
::*logs all warnings from all facilities except the kernel to the /var/log/logfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Facilities used by the System Daemon Log&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Daemon Log&lt;br /&gt;
! description &lt;br /&gt;
|-&lt;br /&gt;
| auth or security&lt;br /&gt;
| Specifies messages from the login system, such as the login program, the getty program, and the su command.&lt;br /&gt;
|-&lt;br /&gt;
|authpriv&lt;br /&gt;
| Specifies messages from the login system when authenticating users across the network or to system databases.&lt;br /&gt;
|-&lt;br /&gt;
| cron&lt;br /&gt;
| Specifies messages from the cron and at daemons&lt;br /&gt;
|-&lt;br /&gt;
| daemon&lt;br /&gt;
| Specifies messages from system daemons, such as the FTP daemon&lt;br /&gt;
|-&lt;br /&gt;
| kern&lt;br /&gt;
| Specifies messages from the Linux kernel.&lt;br /&gt;
|-&lt;br /&gt;
| lpr&lt;br /&gt;
| Specifies messages from the printing system (lpd)&lt;br /&gt;
|-&lt;br /&gt;
| mail&lt;br /&gt;
| Specifies messages from the e-mail system (sendmail).&lt;br /&gt;
|-&lt;br /&gt;
| mark&lt;br /&gt;
| Specifies time stamps used by syslogd; used internally only.&lt;br /&gt;
|-&lt;br /&gt;
| news&lt;br /&gt;
| Specifies messages from the Inter Network News daemon and other USENET daemons.&lt;br /&gt;
|-&lt;br /&gt;
| syslog&lt;br /&gt;
| Specifies messages from the syslog daemon.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Specifies messages from user processes.&lt;br /&gt;
|-&lt;br /&gt;
| uucp&lt;br /&gt;
| Specifies messages from the uucp (UNIX to UNIX copy) daemon.&lt;br /&gt;
|-&lt;br /&gt;
| local0-7&lt;br /&gt;
|Specifies local messages; these are not used by default but can be defined for custom use&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priorities used by the System Daemon Log (listed in ascending order)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Daemon Log&lt;br /&gt;
! Description &lt;br /&gt;
|-&lt;br /&gt;
| debug&lt;br /&gt;
| Indicates all information from a certain facility.&lt;br /&gt;
|-&lt;br /&gt;
| info&lt;br /&gt;
| Indicates normal information messages as a result of system operations&lt;br /&gt;
|-&lt;br /&gt;
| notice&lt;br /&gt;
| Indicates information that should be noted for future reference, yet does not indicate a problem&lt;br /&gt;
|-&lt;br /&gt;
| warning or warn&lt;br /&gt;
| Indicates messages that might be the result of an error but are not critical to system operations.&lt;br /&gt;
|-&lt;br /&gt;
| error or err&lt;br /&gt;
| Indicates all other error messages not described by other priorities.&lt;br /&gt;
|-&lt;br /&gt;
| crit &lt;br /&gt;
| Indicates system critical errors such as hard disk failure.&lt;br /&gt;
|-&lt;br /&gt;
| alert&lt;br /&gt;
| Indicates an error that should be rectified immediately, such as a corrupt system database.&lt;br /&gt;
|-&lt;br /&gt;
| emerg or panic&lt;br /&gt;
| Indicates very serious system conditions that would normally be broadcast to all users&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===The etc/rsyslog.conf file can also send logging information to another computer===&lt;br /&gt;
*Facility.priority @hostname:portnumber&lt;br /&gt;
::*The remote computer&lt;br /&gt;
:::*Must have modules that listen to TCP or UDP protocol uncommented in the /etc/rsyslog.conf&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Commented&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
::# Provides UDP syslog reception&lt;br /&gt;
::#$ModLoad imudp.so&lt;br /&gt;
::#$UDPServerRun 514&lt;br /&gt;
::# Provides TCP syslog reception&lt;br /&gt;
::#$ModLoad imtcp.so&lt;br /&gt;
::#$InputTCPServerRun 514&lt;br /&gt;
			&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Un-Commented&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:::Provides UDP syslog reception&lt;br /&gt;
:::$ModLoad imudp.so&lt;br /&gt;
:::$UDPServerRun 514&lt;br /&gt;
:::Provides TCP syslog reception&lt;br /&gt;
:::$ModLoad imtcp.so&lt;br /&gt;
:::$InputTCPServerRun 514&lt;br /&gt;
:*This allows the system to accept incoming requests from another System Log Daemon on TCP and UDP port 514 (the ::default System Log Daemon port)&lt;br /&gt;
&lt;br /&gt;
===Managing Log Files===&lt;br /&gt;
Log files can contain a lot of important system information so it&amp;#039;s a good idea to clear the contents of the log files from time to time.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; remove the log files, the permissions and ownership will be removed as well!!!&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re just going to clear out the contents of the log file.&lt;br /&gt;
&lt;br /&gt;
To do so the &amp;#039;&amp;#039;&amp;gt; redirect&amp;#039;&amp;#039; symbol can be used.&lt;br /&gt;
&lt;br /&gt;
This function can be scheduled as well using the logrotate command to backup and clear logfiles stored in &amp;#039;&amp;#039;/etc/logrotate.conf&amp;#039;&amp;#039; file and files stored in &amp;#039;&amp;#039;/etc/logrotate.d&amp;#039;&amp;#039; directory&lt;br /&gt;
&lt;br /&gt;
**The log rotate command renames (rotates) log files on a cyclic basis&lt;br /&gt;
&lt;br /&gt;
**test.log becomes test.log.YYYYMMDD&lt;br /&gt;
&lt;br /&gt;
**A new test.log file is created to accept system log info.&lt;br /&gt;
&lt;br /&gt;
*Can be set to keep a certain number of log files&lt;br /&gt;
::*If configured to keep 2 log files, logrotate will only keep 2 copies. Then when it cycles logrotate will automatically remove the oldest copy.&lt;br /&gt;
&lt;br /&gt;
*Most rotation information within /etc/logrotate.conf is overridden from files stored in the &amp;#039;&amp;#039;/etc/logrotate.d directory.&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
On most Linux systems, the logrotate utility is automatically scheduled to run daily via the file &amp;#039;&amp;#039;/etc/cron.daily/logrotate,&amp;#039;&amp;#039; however it can be run manually by typing &amp;#039;&amp;#039;logrotate /etc/logrotate.conf&amp;#039;&amp;#039;  at a command prompt&lt;br /&gt;
&lt;br /&gt;
Over time the logrotate  command generates several copies of each logfile /var/log to view this we type &amp;#039;&amp;#039;Ls /var/log&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Administering Users and Groups==&lt;br /&gt;
&lt;br /&gt;
:*Bash shell prompts for user accounts information this is called authentication.&lt;br /&gt;
&lt;br /&gt;
:*User accounts and passwords are located in the &amp;#039;&amp;#039;&amp;#039;/etc/password&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/etc/shadow&amp;#039;&amp;#039;&amp;#039; and are encrypted&lt;br /&gt;
&lt;br /&gt;
:*&amp;#039;&amp;#039;&amp;#039;/etc/password&amp;#039;&amp;#039;&amp;#039; and a line that contains the encrypted password and&lt;br /&gt;
&lt;br /&gt;
:*&amp;#039;&amp;#039;&amp;#039;/etc/shadow&amp;#039;&amp;#039;&amp;#039; is where the expiration information is stored in.&lt;br /&gt;
&lt;br /&gt;
:*You can use the dfdffpwunconv command to revert to using an /etc/passwd file only, This is not best&lt;br /&gt;
::practice for security&lt;br /&gt;
&lt;br /&gt;
:*You can use the pwconv command to configure the system again using an /etc/shadow file for&lt;br /&gt;
::password storage.&lt;br /&gt;
&lt;br /&gt;
:* This is the format used in /etc/password file “name:password:UID:GID:GECOS:home directory:shell”&lt;br /&gt;
&lt;br /&gt;
:*examples: root:x:0:0:root:/root:/bin/bash&lt;br /&gt;
&lt;br /&gt;
:*8bin:x:1:1:bin:/bin:/sbin/nologin&lt;br /&gt;
&lt;br /&gt;
:*daemon:x:2:2:daemon:/sbin:/sbin/nologin&lt;br /&gt;
&lt;br /&gt;
==UID &amp;amp; /etc/passwd==&lt;br /&gt;
&lt;br /&gt;
:*The User Identifier (UID) specifies the unique User ID that is assigned to each user.&lt;br /&gt;
&lt;br /&gt;
:*The root user always has a UID of zero.&lt;br /&gt;
&lt;br /&gt;
:*UIDs that are less than 500 refer to user accounts that are used by daemons when logging in to&lt;br /&gt;
::the system.&lt;br /&gt;
&lt;br /&gt;
:*The root user is usually listed at the top of the /etc/passwd file&lt;br /&gt;
&lt;br /&gt;
:*In the /etc/passwd file passwords are replaced with the letter “X” password are actually stored&lt;br /&gt;
::in the shadow file and are encrypted.&lt;br /&gt;
&lt;br /&gt;
:::password times are expressed in days.&lt;br /&gt;
&lt;br /&gt;
:*You can change the password expiration time in the shadow file. In the shadow file &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; = time&lt;br /&gt;
::before user can change password again. &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; = time that user can use current password.&lt;br /&gt;
&lt;br /&gt;
:*&amp;#039;&amp;#039;&amp;#039;warn&amp;#039;&amp;#039;&amp;#039;= the number of days before a user is prompted to change their password&lt;br /&gt;
&lt;br /&gt;
:*by default min =0 max=99,999 days and warn= 7days&lt;br /&gt;
&lt;br /&gt;
==Groups==&lt;br /&gt;
&lt;br /&gt;
:*The Group Identifier (GID) is the primary Group ID for the&lt;br /&gt;
::user.&lt;br /&gt;
&lt;br /&gt;
:*primary group ID’s designate file/directory ownership&lt;br /&gt;
&lt;br /&gt;
:*Each user can be a member of several groups, but only one&lt;br /&gt;
::of those groups can be the primary group.&lt;br /&gt;
&lt;br /&gt;
:*primary groups are listed in the password file.&lt;br /&gt;
&lt;br /&gt;
:*All groups and their members are listed in the &amp;#039;&amp;#039;&amp;#039;/etc/group&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Creating User Accounts==&lt;br /&gt;
&lt;br /&gt;
:*useradd command is used to create commands&lt;br /&gt;
&lt;br /&gt;
:::Example: &amp;#039;&amp;#039;&amp;#039;useradd bobg&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:*There is two files that are used to create default account information.&lt;br /&gt;
:*(UID,shell and home directories)&lt;br /&gt;
&lt;br /&gt;
::*The first is &amp;#039;&amp;#039;&amp;#039;/etc/login.defs&amp;#039;&amp;#039;&amp;#039; and sets default locations for email password&lt;br /&gt;
:::expiration minimum password length and the rage of UID and GIDs for&lt;br /&gt;
:::the users.&lt;br /&gt;
::*The second is &amp;#039;&amp;#039;&amp;#039;/etc/default/useradd&amp;#039;&amp;#039;&amp;#039; file. It controls default primary&lt;br /&gt;
:::groups, locations of home directories, number of days to disable&lt;br /&gt;
:::accounts with expired passwords, date to disable user accounts, and the&lt;br /&gt;
:::skeleton directory.&lt;br /&gt;
:*A skeleton directory contains files that are copied to new users home&lt;br /&gt;
::directories when a new user is created.&lt;br /&gt;
&lt;br /&gt;
==Creating User Accounts==&lt;br /&gt;
&lt;br /&gt;
===Typical contents of the default/useradd file===&lt;br /&gt;
:useradd defaults file&lt;br /&gt;
:GROUP=100&lt;br /&gt;
:HOME=/home&lt;br /&gt;
:INACTIVE=-1&lt;br /&gt;
:EXPIRE=&lt;br /&gt;
:SHELL=/bin/bash&lt;br /&gt;
:SKEL=/etc/skel&lt;br /&gt;
:CREATE_MAIL_SPOOL=yes&lt;br /&gt;
:[root@server1 ~]# _&lt;br /&gt;
&lt;br /&gt;
:*You can alter some of the user creation parameter using the options below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Options&lt;br /&gt;
! Function &lt;br /&gt;
|-&lt;br /&gt;
| -e&lt;br /&gt;
| Specifies a date to disable the account from logging in.&lt;br /&gt;
|-&lt;br /&gt;
| -d&lt;br /&gt;
| Sets absolute pathname to the users directory. &lt;br /&gt;
|-&lt;br /&gt;
| -c&lt;br /&gt;
| Adds conscription entry to the GECOS of the /etc/passwd file.&lt;br /&gt;
|-&lt;br /&gt;
| -f &lt;br /&gt;
| Sets number of days until a users password is disabled. &lt;br /&gt;
|-&lt;br /&gt;
| -k&lt;br /&gt;
| Specifies the skeleton directory.&lt;br /&gt;
|-&lt;br /&gt;
| -G&lt;br /&gt;
| Specifies all other group memberships for the user account. &lt;br /&gt;
|-&lt;br /&gt;
| -m&lt;br /&gt;
| specifies that a home directory should be created for the user.&lt;br /&gt;
|-&lt;br /&gt;
| -g&lt;br /&gt;
| Specifies the primary group for the user account.&amp;lt;br /&amp;gt; by default a group is created with the same name as the user and made the primary group for that user&lt;br /&gt;
|-&lt;br /&gt;
| -s&lt;br /&gt;
| sets path to  the shell used for accounts.&lt;br /&gt;
|-&lt;br /&gt;
| -u&lt;br /&gt;
| sets the UID of a account.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*To modify user accounts after creation you&lt;br /&gt;
:may edit the &amp;#039;&amp;#039;&amp;#039;&amp;#039;/etc/passwd&amp;#039;&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;shadow file&amp;#039;&amp;#039;&amp;#039;, but&lt;br /&gt;
:it is not best practice because it may cause&lt;br /&gt;
:topographical errors.&lt;br /&gt;
*The recommended method of editing user&lt;br /&gt;
:accounts is to use the &amp;#039;&amp;#039;&amp;#039;usermod&amp;#039;&amp;#039;&amp;#039; command.&lt;br /&gt;
:example: &amp;#039;&amp;#039;&amp;#039;usermod -l barbg bobg&amp;#039;&amp;#039;&amp;#039; will change&lt;br /&gt;
:the the user name from bobg to barbg.&lt;br /&gt;
&lt;br /&gt;
=== usermod ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Options&lt;br /&gt;
! Function &lt;br /&gt;
|-&lt;br /&gt;
| -f&lt;br /&gt;
| sets the number of days until an expired password is disabled.&lt;br /&gt;
|-&lt;br /&gt;
| -c&lt;br /&gt;
| specifies a new description for the user in the GECOS field of  /etc/passwd.&lt;br /&gt;
|-&lt;br /&gt;
| -d&lt;br /&gt;
| Specifies absolute pathname to a new home directory.&lt;br /&gt;
|-&lt;br /&gt;
| -g&lt;br /&gt;
|Specifies a new primary group for the user account.&lt;br /&gt;
|-&lt;br /&gt;
| -G&lt;br /&gt;
|specifies all other group memberships for the user accounts.&lt;br /&gt;
|-&lt;br /&gt;
| -l&lt;br /&gt;
| sets new login name.&lt;br /&gt;
|-&lt;br /&gt;
| -e &lt;br /&gt;
| Specifies exasperation date.&lt;br /&gt;
|-&lt;br /&gt;
| -s&lt;br /&gt;
| sets new absolute pathname to a new shell used for  a user account.&lt;br /&gt;
|-&lt;br /&gt;
| -u&lt;br /&gt;
| sets new UID for user account. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:* &amp;#039;&amp;#039;&amp;#039;User-mod&amp;#039;&amp;#039;&amp;#039; command can not be used to change password expirations in the&lt;br /&gt;
::shadow file.&lt;br /&gt;
:*To unlock an account you can &amp;#039;&amp;#039;&amp;#039;usermod -U&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;passwd -u&amp;#039;&amp;#039;&amp;#039; commands.&lt;br /&gt;
&lt;br /&gt;
==Deleting user accounts==&lt;br /&gt;
&lt;br /&gt;
:*You can remove user accounts by using the&lt;br /&gt;
::&amp;#039;&amp;#039;&amp;#039;userdel&amp;#039;&amp;#039;&amp;#039; command. This removes entries from the&lt;br /&gt;
::&amp;#039;&amp;#039;&amp;#039;/etc/passwd&amp;#039;&amp;#039;&amp;#039; and the &amp;#039;&amp;#039;&amp;#039;/etc/shadow file.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:*If you use &amp;#039;&amp;#039;&amp;#039;-r&amp;#039;&amp;#039;&amp;#039; option it will remove the that user&amp;#039;s&lt;br /&gt;
::home directory and its contents.&lt;br /&gt;
&lt;br /&gt;
:*if a user is deleted the files are owned by the next&lt;br /&gt;
::users with the same UID. The new recipient will&lt;br /&gt;
::have a folder that has the name of the former owner.&lt;br /&gt;
==Managing Groups==&lt;br /&gt;
&lt;br /&gt;
:*To you can add Groups by editing /etc group file with a text editor, &lt;br /&gt;
::or use the groupadd&lt;br /&gt;
:*If you use -r option it will remove the that user&amp;#039;s&lt;br /&gt;
::home directory and its contents.&lt;br /&gt;
:*To use the groupadd command you need to use -g option with the GID number and the&lt;br /&gt;
::group name. Example : &amp;#039;&amp;#039;&amp;#039;groupadd –g 492 group1&amp;#039;&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
:*You can also add users to a group by using the &amp;#039;&amp;#039;&amp;#039;usermod&amp;#039;&amp;#039;&amp;#039; command with the -G option&lt;br /&gt;
::followed by the username. example: &amp;#039;&amp;#039;&amp;#039;usermod –G group1 maryj&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:*The &amp;#039;&amp;#039;&amp;#039;groupmod&amp;#039;&amp;#039;&amp;#039; command that can be used to modify the group name and GID, there is also&lt;br /&gt;
:*you can see a list of groups you or a user belongs to by using the groups command. To see&lt;br /&gt;
::what GID the Groups have use the &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
:*you can use the newgrp command. to change primary groups and change file ownership.&lt;br /&gt;
:*groups can be managed using a GUI environment in the by navigating to System menu,&lt;br /&gt;
::select Administration, Users and Groups.&lt;br /&gt;
&lt;br /&gt;
:*you can see a list of groups you or a user belongs to by using the groups command. To see&lt;br /&gt;
::what GID the Groups have use the &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
:*you can use the &amp;#039;&amp;#039;&amp;#039;newgrp&amp;#039;&amp;#039;&amp;#039; command. to change primary groups and change file ownership.&lt;br /&gt;
&lt;br /&gt;
:*groups can be managed using a GUI environment in the by navigating to System menu,&lt;br /&gt;
::select Administration, Users and Groups.&lt;/div&gt;</summary>
		<author><name>Hess0060</name></author>
	</entry>
</feed>