User:Hess0060: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==Printer Administration== | ==Printer Administration== | ||
Common UNIX Printing System (CUPS) is a printing system used by Linux | :*'''Common UNIX Printing System''' (CUPS) is a printing system used by Linux computers. | ||
computers. Information that will be sent to a printer is called a print job. | :*Information that will be sent to a printer is called a print job. | ||
The lp command is used to specify and print the print job. To check the status | :*The '''lp''' command is used to specify and print the print job. | ||
of a printer(s) the lpstat command is used. The cups daemon (cupsd) will | :*To check the status of a printer(s) the '''lpstat''' command is used. | ||
assign all print jobs a unique print job ID and put them in the print queue. | :*The cups daemon (cupsd) will assign all print jobs a unique print job | ||
The print queue is a special temporary directory where the print jobs are | ::ID and put them in the print queue. | ||
stored before being sent to the printer. The path of the queue is usually | :*The print queue is a special temporary directory where the print jobs are | ||
/var/spool/cups on most Linux systems. If the printer is accepting print jobs, | ::stored before being sent to the printer. | ||
the cupsd will put the print job in to the queue. This is called spooling or | :*The path of the queue is usually '''/var/spool/cups''' on most Linux systems. | ||
queuing. | :*If the printer is accepting print jobs,the cupsd will put the print job in to the queue. | ||
Adding the –t option shows all the printers and there statuses on the system. | :*This is called spooling or queuing. | ||
kevin@kubuntu1:~$ lpstat -t | :*Adding the –t option shows all the printers and there statuses on the system. | ||
scheduler is running | |||
system default destination: Samsung-ML-2152W | :::kevin@kubuntu1:~$ lpstat -t | ||
device for Samsung-ML-2152W: smb:///192.168.0.195 | :::scheduler is running | ||
Samsung-ML-2152W accepting requests since Tue 17 Jan 2012 11:25:40 PM CST | :::system default destination: Samsung-ML-2152W | ||
printer Samsung-ML-2152W is idle. enabled since Tue 17 Jan 2012 11:25:40 PM | :::device for Samsung-ML-2152W: smb:///192.168.0.195 | ||
CST | :::Samsung-ML-2152W accepting requests since Tue 17 Jan 2012 11:25:40 PM CST | ||
kevin@kubuntu1:~$ | :::printer Samsung-ML-2152W is idle. enabled since Tue 17 Jan 2012 11:25:40 PM | ||
To manipulate the status of a printer by using the cupsaccept, cupsreject, | :::CST | ||
cupsenable, or cupsdisable commands. | :::kevin@kubuntu1:~$ | ||
kevin@kubuntu1:~$ cupsaccept Samsung-ML-2152W | :*To manipulate the status of a printer by using the cupsaccept, cupsreject, | ||
kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W | ::cupsenable, or cupsdisable commands. | ||
kevin@kubuntu1:~$ lpstat -t | ::kevin@kubuntu1:~$ cupsaccept Samsung-ML-2152W | ||
scheduler is running | ::kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W | ||
system default destination: Samsung-ML-2152W | ::kevin@kubuntu1:~$ lpstat -t | ||
device for Samsung-ML-2152W: smb:///192.168.0.195 | ::scheduler is running | ||
Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT | ::system default destination: Samsung-ML-2152W | ||
printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT - | ::device for Samsung-ML-2152W: smb:///192.168.0.195 | ||
Paused | ::Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT | ||
kevin@kubuntu1:~$ | ::printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT - | ||
The –r option is used to give a reason why the printer’s status is set as | ::Paused | ||
such. | ::kevin@kubuntu1:~$ | ||
kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W -r "OMG the printer is on fire" | :*The –r option is used to give a reason why the printer’s status is set as | ||
Samsung-ML-2152W | ::such. | ||
kevin@kubuntu1:~$ lpstat -t | ::kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W -r "OMG the printer is on fire" | ||
scheduler is running | ::Samsung-ML-2152W | ||
system default destination: Samsung-ML-2152W | ::kevin@kubuntu1:~$ lpstat -t | ||
device for Samsung-ML-2152W: smb:///192.168.0.195 | ::scheduler is running | ||
Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT | ::system default destination: Samsung-ML-2152W | ||
printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT - | ::device for Samsung-ML-2152W: smb:///192.168.0.195 | ||
OMG the printer is on fire | ::Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT | ||
kevin@kubuntu1:/$ | ::printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT - | ||
Use the lp command to print. | ::OMG the printer is on fire | ||
kevin@kubuntu1:/$ lp -d Samsung-ML-2152W /home/kevin/Documents/reports | ::kevin@kubuntu1:/$ | ||
request id is Samsung-ML-2152W-2 (1 file(s)) | :*Use the lp command to print. | ||
kevin@kubuntu1:/$ | ::kevin@kubuntu1:/$ lp -d Samsung-ML-2152W /home/kevin/Documents/reports | ||
Other options can be added to the lp command as shown. | ::request id is Samsung-ML-2152W-2 (1 file(s)) | ||
::kevin@kubuntu1:/$ | |||
:*Other options can be added to the lp command as shown. | |||
−d printername | |||
Specifies the name of the printer to send the print job to | |||
{| class="wikitable" | |||
−n | ! Options | ||
−m Mails you confirmation of print job completion | ! Function | ||
−o option Specifies certain printing options. Common printing | |- | ||
| −i | |||
| Print job ID Specifies a certain print job ID to modify | |||
|- | |||
| −d | |||
| printername, Specifies the name of the printer to send the print job to | |||
|- | |||
| −n | |||
| Number Prints a certain number of copies, where number can be any number | |||
|- | |||
| −m | |||
| Mails you confirmation of print job completion | |||
|- | |||
| −o | |||
| option Specifies certain printing options. Common printing options include the following: | |||
|- | |||
|) | |||
cpi=number—Specifies the number of characters per inch, | |||
where number is the number of characters | where number is the number of characters | ||
landscape—Prints in landscape orientation | landscape—Prints in landscape orientation | ||
Line 64: | Line 80: | ||
sides=string—Sets double-sided printing, where string is | sides=string—Sets double-sided printing, where string is | ||
either ”two-sided-short-edge” or ”two-sided-long-edge” | either ”two-sided-short-edge” or ”two-sided-long-edge” | ||
To print a list of all users logged in, pipe the who command to the lp | To print a list of all users logged in, pipe the who command to the lp | ||
command. | command. |
Revision as of 09:11, 26 March 2012
Printer Administration
- Common UNIX Printing System (CUPS) is a printing system used by Linux computers.
- Information that will be sent to a printer is called a print job.
- The lp command is used to specify and print the print job.
- To check the status of a printer(s) the lpstat command is used.
- The cups daemon (cupsd) will assign all print jobs a unique print job
- ID and put them in the print queue.
- The print queue is a special temporary directory where the print jobs are
- stored before being sent to the printer.
- The path of the queue is usually /var/spool/cups on most Linux systems.
- If the printer is accepting print jobs,the cupsd will put the print job in to the queue.
- This is called spooling or queuing.
- Adding the –t option shows all the printers and there statuses on the system.
- kevin@kubuntu1:~$ lpstat -t
- scheduler is running
- system default destination: Samsung-ML-2152W
- device for Samsung-ML-2152W: smb:///192.168.0.195
- Samsung-ML-2152W accepting requests since Tue 17 Jan 2012 11:25:40 PM CST
- printer Samsung-ML-2152W is idle. enabled since Tue 17 Jan 2012 11:25:40 PM
- CST
- kevin@kubuntu1:~$
- To manipulate the status of a printer by using the cupsaccept, cupsreject,
- cupsenable, or cupsdisable commands.
- kevin@kubuntu1:~$ cupsaccept Samsung-ML-2152W
- kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W
- kevin@kubuntu1:~$ lpstat -t
- scheduler is running
- system default destination: Samsung-ML-2152W
- device for Samsung-ML-2152W: smb:///192.168.0.195
- Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT
- printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT -
- Paused
- kevin@kubuntu1:~$
- The –r option is used to give a reason why the printer’s status is set as
- such.
- kevin@kubuntu1:~$ cupsdisable Samsung-ML-2152W -r "OMG the printer is on fire"
- Samsung-ML-2152W
- kevin@kubuntu1:~$ lpstat -t
- scheduler is running
- system default destination: Samsung-ML-2152W
- device for Samsung-ML-2152W: smb:///192.168.0.195
- Samsung-ML-2152W accepting requests since Fri 23 Mar 2012 11:35:18 AM CDT
- printer Samsung-ML-2152W disabled since Fri 23 Mar 2012 11:35:18 AM CDT -
- OMG the printer is on fire
- kevin@kubuntu1:/$
- Use the lp command to print.
- kevin@kubuntu1:/$ lp -d Samsung-ML-2152W /home/kevin/Documents/reports
- request id is Samsung-ML-2152W-2 (1 file(s))
- kevin@kubuntu1:/$
- Other options can be added to the lp command as shown.
Options | Function | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
−i | Print job ID Specifies a certain print job ID to modify | |||||||||||||||||||||||||||||||||||||||||
−d | printername, Specifies the name of the printer to send the print job to | |||||||||||||||||||||||||||||||||||||||||
−n | Number Prints a certain number of copies, where number can be any number | |||||||||||||||||||||||||||||||||||||||||
−m | Mails you confirmation of print job completion | |||||||||||||||||||||||||||||||||||||||||
−o | option Specifies certain printing options. Common printing options include the following: | |||||||||||||||||||||||||||||||||||||||||
)
cpi=number—Specifies the number of characters per inch, where number is the number of characters landscape—Prints in landscape orientation number-up=number—Prints the number of pages on a single page, where number is 1, 2, or 4 sides=string—Sets double-sided printing, where string is either ”two-sided-short-edge” or ”two-sided-long-edge” To print a list of all users logged in, pipe the who command to the lp command. kevin@kubuntu1:/$ who | lp -d Samsung-ML-2152W request id is Samsung-ML-2152W-4 (0 file(s)) kevin@kubuntu1:/$ To remove all print jobs from a specific user, add the –u <username> before the cancel command. To remove all print jobs use the –a as shown. kevin@kubuntu1:/$ cancel -a kevin@kubuntu1:/$ lpstat kevin@kubuntu1:/$ The Line Printer Daemon (LPD) is an alternative to CUPS, that is used by older Linux systems. The LPD commands can be used in CUPS. LPR command = print documents LPC command = view printer status LPQ command = see jobs in the queue LPRM command = remove job form queue You can find the cupsd configuration file in the /etc/cups/cupsd.conf directory. The /etc/cups/printers.conf contains settings about the specific printer. The command system-config-printer will launch a GUI-based program; the Printer Configuration tool. This program lets you add printers with Plug and Play (PnP) or specify the Uniform Resource Identifier (URI). Hewlett-Packard JetDirect, Internet Printing Protocol (IPP), Line Printer Daemon (LPD or Windows (SAMBA) allows you to print to a printer across the network. From the Printer Configuration tool you are also able to give users and groups permission to print to specific printers. You can use CUPS to administer and remotely administer printes through a web browser. To open the CUPS web-based control panel, navigate to http://servername:631. Log File Administration
Common Linux log files found in /var/log
System Log Daemon
Priorities used by the System Daemon Log (listed in ascending order)
Managing Log FilesLog files can contain a lot of important system information so it's a good idea to clear the contents of the log files from time to time. DO NOT remove the log files, the permissions and ownership will be removed as well!!! We're just going to clear out the contents of the log file. To do so the > redirect symbol can be used. This function can be scheduled as well using the logrotate command to backup and clear logfiles stored in /etc/logrotate.conf file and files stored in /etc/logrotate.d directory
On most Linux systems, the logrotate utility is automatically scheduled to run daily via the file /etc/cron.daily/logrotate, however it can be run manually by typing logrotate /etc/logrotate.conf at a command prompt Over time the logrotate command generates several copies of each logfile /var/log to view this we type Ls /var/log Administering Users and Groups
UID & /etc/passwd
Groups
Creating User Accounts
Creating User AccountsTypical contents of the default/useradd file
usermod
Deleting user accounts
Managing Groups
|