Server Berkas dan Cetak
Bab ini memandu Anda melalui instalasi dan konfigurasi dari Samba, suatu implementasi open source dari protokol Server Message Block (SMB) dan common Internet file system (CIFS
), dan vsftpd, server FTP primer yang dikemas dengan Fedora. Sebagai tambahan, itu menjelaskan bagaimana menggunakan perkakas Pencetak untuk mengonfigurasi pencetak.
Samba
Documentation for configuring and using Samba has been removed due to being outdated. Use Red Hat Enterprise Linux 9 Samba documentation instead. |
FTP
File Transfer Protocol (FTP
) is one of the oldest and most commonly used protocols found on the Internet today. Its purpose is to reliably transfer files between computer hosts on a network without requiring the user to log directly into the remote host or have knowledge of how to use the remote system. It allows users to access files on remote systems using a standard set of simple commands.
This section outlines the basics of the FTP
protocol, as well as configuration options for the primary FTP
server shipped with Fedora, vsftpd.
The File Transfer Protocol
However, because FTP
is so prevalent on the Internet, it is often required to share files to the public. System administrators, therefore, should be aware of the FTP
protocol’s unique characteristics.
Multiple Ports, Multiple Modes
Unlike most protocols used on the Internet, FTP
requires multiple network ports to work properly. When an FTP
client application initiates a connection to an FTP
server, it opens port 21 on the server — known as the command port. This port is used to issue all commands to the server. Any data requested from the server is returned to the client via a data port. The port number for data connections, and the way in which data connections are initialized, vary depending upon whether the client requests the data in active or passive mode.
The following defines these modes:
- active mode
-
Active mode is the original method used by the
FTP
protocol for transferring data to the client application. When an active mode data transfer is initiated by theFTP
client, the server opens a connection from port 20 on the server to theIP
address and a random, unprivileged port (greater than 1024) specified by the client. This arrangement means that the client machine must be allowed to accept connections over any port above 1024. With the growth of insecure networks, such as the Internet, the use of firewalls to protect client machines is now prevalent. Because these client-side firewalls often deny incoming connections from active modeFTP
servers, passive mode was devised. - passive mode
-
Passive mode, like active mode, is initiated by the
FTP
client application. When requesting data from the server, theFTP
client indicates it wants to access the data in passive mode and the server provides theIP
address and a random, unprivileged port (greater than 1024) on the server. The client then connects to that port on the server to download the requested information.While passive mode resolves issues for client-side firewall interference with data connections, it can complicate administration of the server-side firewall. You can reduce the number of open ports on a server by limiting the range of unprivileged ports on the
FTP
server. This also simplifies the process of configuring firewall rules for the server. See Network Options for more information about limiting passive ports.
FTP Servers
Fedora ships with two different FTP
servers:
-
proftpd - A fast, stable, and highly configurable FTP server.
-
vsftpd — A fast, secure
FTP
daemon which is the preferredFTP
server for Fedora. The remainder of this section focuses on vsftpd.
vsftpd
The Very Secure FTP Daemon (vsftpd) is designed from the ground up to be fast, stable, and, most importantly, secure. vsftpd is the only stand-alone FTP
server distributed with Fedora, due to its ability to handle large numbers of connections efficiently and securely.
The security model used by vsftpd has three primary aspects:
-
Strong separation of privileged and non-privileged processes — Separate processes handle different tasks, and each of these processes run with the minimal privileges required for the task.
-
Tasks requiring elevated privileges are handled by processes with the minimal privilege necessary — By leveraging compatibilities found in the
libcap
library, tasks that usually require fullroot
privileges can be executed more safely from a less privileged process. -
Most processes run in a chroot jail — Whenever possible, processes are change-rooted to the directory being shared; this directory is then considered a chroot jail. For example, if the directory /var/ftp/ is the primary shared directory, vsftpd reassigns /var/ftp/ to the new root directory, known as /. This disallows any potential malicious hacker activities for any directories not contained below the new root directory.
Use of these security practices has the following effect on how vsftpd deals with requests:
-
The parent process runs with the least privileges required — The parent process dynamically calculates the level of privileges it requires to minimize the level of risk. Child processes handle direct interaction with the
FTP
clients and run with as close to no privileges as possible. -
All operations requiring elevated privileges are handled by a small parent process — Much like the Apache
HTTP
Server, vsftpd launches unprivileged child processes to handle incoming connections. This allows the privileged, parent process to be as small as possible and handle relatively few tasks. -
All requests from unprivileged child processes are distrusted by the parent process — Communication with child processes are received over a socket, and the validity of any information from child processes is checked before being acted on.
-
Most interaction with
FTP
clients is handled by unprivileged child processes in a chroot jail — Because these child processes are unprivileged and only have access to the directory being shared, any crashed processes only allows the attacker access to the shared files.
Files Installed with vsftpd
The vsftpd
RPM installs the daemon (/usr/sbin/vsftpd
), its configuration and related files, as well as FTP
directories onto the system. The following lists the files and directories related to vsftpd configuration:
-
/etc/rc.d/init.d/vsftpd
— The initialization script (initscript) used by the systemctl command to start, stop, or reload vsftpd. See Starting and Stopping vsftpd for more information about using this script. -
/etc/pam.d/vsftpd
— The Pluggable Authentication Modules (PAM) configuration file for vsftpd. This file specifies the requirements a user must meet to login to theFTP
server. For more information on PAM, refer to the Using Pluggable Authentication Modules (PAM) chapter of the Fedora 37 Managing Single Sign-On and Smart Cards guide. -
/etc/vsftpd/vsftpd.conf
— The configuration file for vsftpd. See vsftpd Configuration Options for a list of important options contained within this file. -
/etc/vsftpd/ftpusers
— A list of users not allowed to log into vsftpd. By default, this list includes theroot
,bin
, anddaemon
users, among others. -
/etc/vsftpd/user_list
— This file can be configured to either deny or allow access to the users listed, depending on whether the userlist_deny directive is set to YES (default) or NO in/etc/vsftpd/vsftpd.conf
. If/etc/vsftpd/user_list
is used to grant access to users, the usernames listed must not appear in/etc/vsftpd/ftpusers
. -
/var/ftp/
— The directory containing files served by vsftpd. It also contains the/var/ftp/pub/
directory for anonymous users. Both directories are world-readable, but writable only by theroot
user.
Starting and Stopping vsftpd
The vsftpd
RPM installs the /etc/rc.d/init.d/vsftpd
script, which can be accessed using the systemctl command.
To start the server, as root
type:
systemctl start vsftpd.service
To stop the server, as root
type:
systemctl stop vsftpd.service
The restart
option is a shorthand way of stopping and then starting vsftpd. This is the most efficient way to make configuration changes take effect after editing the configuration file for vsftpd.
To restart the server, as root
type:
systemctl restart vsftpd.service
The condrestart
(conditional restart) option only starts vsftpd if it is currently running. This option is useful for scripts, because it does not start the daemon if it is not running.
To conditionally restart the server, as root
type:
systemctl condrestart vsftpd.service
By default, the vsftpd service does not start automatically at boot time. To configure the vsftpd service to start at boot time, use a service manager such as systemctl. See Services and Daemons for more information on how to configure services in Fedora.
Configuring the Firewall for FTP
By default, firewalld
blocks incoming FTP connections. To allow FTP connections, as root
type:
firewall-cmd --add-service=ftp
The change will be applied immediately, but will be lost next time firewalld
is reloaded or the system restarted. To make it permanent, type:
firewall-cmd --permanent --add-service=ftp
For more information on configuring firewalld
, see the Red Hat Enterprise Linux 7 Security Guide.
Starting Multiple Copies of vsftpd
Sometimes one computer is used to serve multiple FTP
domains. This is a technique called multihoming. One way to multihome using vsftpd is by running multiple copies of the daemon, each with its own configuration file.
To do this, first assign all relevant IP
addresses to network devices or alias network devices on the system. For more information about configuring network devices, device aliases, and additional information about network configuration scripts, refer to the Fedora Networking Guide.
Next, the DNS server for the FTP
domains must be configured to reference the correct machine. For information about BIND and its configuration files, refer to the Fedora Networking Guide.
If there is more configuration files present in the /etc/vsftpd
directory, calling systemctl start vsftpd.service results in the /etc/rc.d/init.d/vsftpd
initscript starting the same number of processes as the number of configuration files. Each configuration file must have a unique name in the /etc/vsftpd/
directory and must be readable and writable only by root
.
vsftpd Configuration Options
Although vsftpd may not offer the level of customization other widely available FTP
servers have, it offers enough options to fill most administrator’s needs. The fact that it is not overly feature-laden limits configuration and programmatic errors.
All configuration of vsftpd is handled by its configuration file, /etc/vsftpd/vsftpd.conf
. Each directive is on its own line within the file and follows the following format:
directive=value
For each directive, replace directive with a valid directive and value with a valid value.
Do not use spaces
There must not be any spaces between the directive, equal symbol, and the value in a directive. |
Comment lines must be preceded by a hash sign (#) and are ignored by the daemon.
For a complete list of all directives available, refer to the man page for vsftpd.conf
.
Securing the vsftpd service
For an overview of ways to secure vsftpd, see the Red Hat Enterprise Linux 7 Security Guide. |
The following is a list of some of the more important directives within /etc/vsftpd/vsftpd.conf
. All directives not explicitly found or commented out within vsftpd's configuration file are set to their default value.
Daemon Options
The following is a list of directives which control the overall behavior of the vsftpd daemon.
-
listen — When enabled, vsftpd runs in stand-alone mode. Fedora sets this value to YES. This directive cannot be used in conjunction with the listen_ipv6 directive.
The default value is NO.
-
listen_ipv6 — When enabled, vsftpd runs in stand-alone mode, but listens only to
IPv6
sockets. This directive cannot be used in conjunction with the listen directive.The default value is NO.
-
session_support — When enabled, vsftpd attempts to maintain login sessions for each user through Pluggable Authentication Modules (PAM). For more information, refer to the Using Pluggable Authentication Modules (PAM) chapter of the Red Hat Enterprise Linux 6 Managing Single Sign-On and Smart Cards and the PAM man pages. . If session logging is not necessary, disabling this option allows vsftpd to run with less processes and lower privileges.
The default value is YES.
Log In Options and Access Controls
The following is a list of directives which control the login behavior and access control mechanisms.
-
anonymous_enable — When enabled, anonymous users are allowed to log in. The usernames
anonymous
andftp
are accepted.The default value is YES.
See Anonymous User Options for a list of directives affecting anonymous users.
-
banned_email_file — If the deny_email_enable directive is set to YES, this directive specifies the file containing a list of anonymous email passwords which are not permitted access to the server.
The default value is
/etc/vsftpd/banned_emails
. -
banner_file — Specifies the file containing text displayed when a connection is established to the server. This option overrides any text specified in the ftpd_banner directive.
There is no default value for this directive.
-
cmds_allowed — Specifies a comma-delimited list of
FTP
commands allowed by the server. All other commands are rejected.There is no default value for this directive.
-
deny_email_enable — When enabled, any anonymous user utilizing email passwords specified in the
/etc/vsftpd/banned_emails
are denied access to the server. The name of the file referenced by this directive can be specified using the banned_email_file directive.The default value is NO.
-
ftpd_banner — When enabled, the string specified within this directive is displayed when a connection is established to the server. This option can be overridden by the banner_file directive.
By default vsftpd displays its standard banner.
-
local_enable — When enabled, local users are allowed to log into the system.
The default value is YES.
See Local User Options for a list of directives affecting local users.
-
pam_service_name — Specifies the PAM service name for vsftpd.
The default value is ftp. Note, in Fedora, the value is set to vsftpd.
-
The default value is NO. Note, in Fedora, the value is set to YES.
-
userlist_deny — When used in conjunction with the userlist_enable directive and set to NO, all local users are denied access unless the username is listed in the file specified by the userlist_file directive. Because access is denied before the client is asked for a password, setting this directive to NO prevents local users from submitting unencrypted passwords over the network.
The default value is YES.
-
userlist_enable — When enabled, the users listed in the file specified by the userlist_file directive are denied access. Because access is denied before the client is asked for a password, users are prevented from submitting unencrypted passwords over the network.
The default value is NO, however under Fedora the value is set to YES.
-
userlist_file — Specifies the file referenced by vsftpd when the userlist_enable directive is enabled.
The default value is /etc/vsftpd/user_list and is created during installation.
Anonymous User Options
The following lists directives which control anonymous user access to the server. To use these options, the anonymous_enable directive must be set to YES.
-
anon_mkdir_write_enable — When enabled in conjunction with the write_enable directive, anonymous users are allowed to create new directories within a parent directory which has write permissions.
The default value is NO.
-
anon_root — Specifies the directory vsftpd changes to after an anonymous user logs in.
There is no default value for this directive.
-
anon_upload_enable — When enabled in conjunction with the write_enable directive, anonymous users are allowed to upload files within a parent directory which has write permissions.
The default value is NO.
-
anon_world_readable_only — When enabled, anonymous users are only allowed to download world-readable files.
The default value is YES.
-
ftp_username — Specifies the local user account (listed in
/etc/passwd
) used for the anonymousFTP
user. The home directory specified in/etc/passwd
for the user is the root directory of the anonymousFTP
user.The default value is ftp.
-
no_anon_password — When enabled, the anonymous user is not asked for a password.
The default value is NO.
-
secure_email_list_enable — When enabled, only a specified list of email passwords for anonymous logins are accepted. This is a convenient way to offer limited security to public content without the need for virtual users.
Anonymous logins are prevented unless the password provided is listed in /etc/vsftpd/email_passwords. The file format is one password per line, with no trailing white spaces.
The default value is NO.
Local User Options
The following lists directives which characterize the way local users access the server. To use these options, the local_enable directive must be set to YES.
-
chmod_enable — When enabled, the
FTP
command SITE CHMOD is allowed for local users. This command allows the users to change the permissions on files.The default value is YES.
-
chroot_list_enable — When enabled, the local users listed in the file specified in the chroot_list_file directive are placed in a chroot jail upon log in.
If enabled in conjunction with the chroot_local_user directive, the local users listed in the file specified in the chroot_list_file directive are not placed in a chroot jail upon log in.
The default value is NO.
-
chroot_list_file — Specifies the file containing a list of local users referenced when the chroot_list_enable directive is set to YES.
The default value is /etc/vsftpd/chroot_list.
-
chroot_local_user — When enabled, local users are change-rooted to their home directories after logging in.
The default value is NO.
Avoid enabling the chroot_local_user optionEnabling chroot_local_user opens up a number of security issues, especially for users with upload privileges. For this reason, it is not recommended.
-
guest_enable — When enabled, all non-anonymous users are logged in as the user guest, which is the local user specified in the guest_username directive.
The default value is NO.
-
guest_username — Specifies the username the guest user is mapped to.
The default value is ftp.
-
local_root — Specifies the directory vsftpd changes to after a local user logs in.
There is no default value for this directive.
-
local_umask — Specifies the umask value for file creation. Note that the default value is in octal form (a numerical system with a base of eight), which includes a “0” prefix. Otherwise the value is treated as a base-10 integer.
The default value is 022.
-
passwd_chroot_enable — When enabled in conjunction with the chroot_local_user directive, vsftpd change-roots local users based on the occurrence of the /./ in the home directory field within
/etc/passwd
.The default value is NO.
-
user_config_dir — Specifies the path to a directory containing configuration files bearing the name of local system users that contain specific setting for that user. Any directive in the user’s configuration file overrides those found in
/etc/vsftpd/vsftpd.conf
.There is no default value for this directive.
Directory Options
The following lists directives which affect directories.
-
dirlist_enable — When enabled, users are allowed to view directory lists.
The default value is YES.
-
dirmessage_enable — When enabled, a message is displayed whenever a user enters a directory with a message file. This message resides within the current directory. The name of this file is specified in the message_file directive and is
.message
by default.The default value is NO. Note, in Fedora, the value is set to YES.
-
force_dot_files — When enabled, files beginning with a dot (
.
) are listed in directory listings, with the exception of the.
and..
files.The default value is NO.
-
hide_ids — When enabled, all directory listings show
ftp
as the user and group for each file.The default value is NO.
-
message_file — Specifies the name of the message file when using the dirmessage_enable directive.
The default value is .message.
-
text_userdb_names — When enabled, text usernames and group names are used in place of UID and GID entries. Enabling this option may slow performance of the server.
The default value is NO.
-
use_localtime — When enabled, directory listings reveal the local time for the computer instead of GMT.
The default value is NO.
File Transfer Options
The following lists directives which affect directories.
-
download_enable — When enabled, file downloads are permitted.
The default value is YES.
-
chown_uploads — When enabled, all files uploaded by anonymous users are owned by the user specified in the chown_username directive.
The default value is NO.
-
chown_username — Specifies the ownership of anonymously uploaded files if the chown_uploads directive is enabled.
The default value is root.
-
write_enable — When enabled,
FTP
commands which can change the file system are allowed, such as DELE, RNFR, and STOR.The default value is YES.
Logging Options
The following lists directives which affect vsftpd's logging behavior.
-
dual_log_enable — When enabled in conjunction with xferlog_enable, vsftpd writes two files simultaneously: a wu-ftpd-compatible log to the file specified in the xferlog_file directive (
/var/log/xferlog
by default) and a standard vsftpd log file specified in the vsftpd_log_file directive (/var/log/vsftpd.log
by default).The default value is NO.
-
log_ftp_protocol — When enabled in conjunction with xferlog_enable and with xferlog_std_format set to NO, all
FTP
commands and responses are logged. This directive is useful for debugging.The default value is NO.
-
syslog_enable — When enabled in conjunction with xferlog_enable, all logging normally written to the standard vsftpd log file specified in the vsftpd_log_file directive (
/var/log/vsftpd.log
by default) is sent to the system logger instead under theFTPD
facility.The default value is NO.
-
vsftpd_log_file — Specifies the vsftpd log file. For this file to be used, xferlog_enable must be enabled and xferlog_std_format must either be set to NO or, if xferlog_std_format is set to YES, dual_log_enable must be enabled. It is important to note that if syslog_enable is set to YES, the system log is used instead of the file specified in this directive.
The default value is
/var/log/vsftpd.log
. -
xferlog_enable — When enabled, vsftpd logs connections (vsftpd format only) and file transfer information to the log file specified in the vsftpd_log_file directive (
/var/log/vsftpd.log
by default). If xferlog_std_format is set to YES, file transfer information is logged but connections are not, and the log file specified in xferlog_file (/var/log/xferlog
by default) is used instead. It is important to note that both log files and log formats are used if dual_log_enable is set to YES.The default value is NO. Note, in Fedora, the value is set to YES.
-
xferlog_file — Specifies the wu-ftpd-compatible log file. For this file to be used, xferlog_enable must be enabled and xferlog_std_format must be set to YES. It is also used if dual_log_enable is set to YES.
The default value is
/var/log/xferlog
. -
xferlog_std_format — When enabled in conjunction with xferlog_enable, only a wu-ftpd-compatible file transfer log is written to the file specified in the xferlog_file directive (
/var/log/xferlog
by default). It is important to note that this file only logs file transfers and does not log connections to the server.The default value is NO. Note, in Fedora, the value is set to YES.
Maintaining compatibility with older log file formats
To maintain compatibility with log files written by the older wu-ftpd To both log connections in vsftpd format and maintain a wu-ftpd-compatible file transfer log, set dual_log_enable to YES. If maintaining a wu-ftpd-compatible file transfer log is not important, either set xferlog_std_format to NO, comment the line with a hash sign (#), or delete the line entirely. |
Network Options
The following lists directives which affect how vsftpd interacts with the network.
-
accept_timeout — Specifies the amount of time for a client using passive mode to establish a connection.
The default value is 60.
-
anon_max_rate — Specifies the maximum data transfer rate for anonymous users in bytes per second.
The default value is 0, which does not limit the transfer rate.
-
connect_from_port_20 When enabled, vsftpd runs with enough privileges to open port 20 on the server during active mode data transfers. Disabling this option allows vsftpd to run with less privileges, but may be incompatible with some
FTP
clients.The default value is NO. Note, in Fedora, the value is set to YES.
-
connect_timeout — Specifies the maximum amount of time a client using active mode has to respond to a data connection, in seconds.
The default value is 60.
-
data_connection_timeout — Specifies maximum amount of time data transfers are allowed to stall, in seconds. Once triggered, the connection to the remote client is closed.
The default value is 300.
-
ftp_data_port — Specifies the port used for active data connections when connect_from_port_20 is set to YES.
The default value is 20.
-
idle_session_timeout — Specifies the maximum amount of time between commands from a remote client. Once triggered, the connection to the remote client is closed.
The default value is 300.
-
listen_address — Specifies the
IP
address on which vsftpd listens for network connections.There is no default value for this directive.
Running multiple copies of vsftpdIf running multiple copies of vsftpd serving different
IP
addresses, the configuration file for each copy of the vsftpd daemon must have a different value for this directive. See Starting Multiple Copies of vsftpd for more information about multihomedFTP
servers. -
listen_address6 — Specifies the
IPv6
address on which vsftpd listens for network connections when listen_ipv6 is set to YES.There is no default value for this directive.
Running multiple copies of vsftpdIf running multiple copies of vsftpd serving different
IP
addresses, the configuration file for each copy of the vsftpd daemon must have a different value for this directive. See Starting Multiple Copies of vsftpd for more information about multihomedFTP
servers. -
listen_port — Specifies the port on which vsftpd listens for network connections.
The default value is 21.
-
local_max_rate — Specifies the maximum rate data is transferred for local users logged into the server in bytes per second.
The default value is 0, which does not limit the transfer rate.
-
max_clients — Specifies the maximum number of simultaneous clients allowed to connect to the server when it is running in standalone mode. Any additional client connections would result in an error message.
The default value is 0, which does not limit connections.
-
max_per_ip — Specifies the maximum of clients allowed to connected from the same source
IP
address.The default value is 0, which does not limit connections.
-
pasv_address — Specifies the
IP
address for the public facingIP
address of the server for servers behind Network Address Translation (NAT) firewalls. This enables vsftpd to hand out the correct return address for passive mode connections.There is no default value for this directive.
-
pasv_enable — When enabled, passive mode connects are allowed.
The default value is YES.
-
pasv_max_port — Specifies the highest possible port sent to the
FTP
clients for passive mode connections. This setting is used to limit the port range so that firewall rules are easier to create.The default value is 0, which does not limit the highest passive port range. The value must not exceed 65535.
-
pasv_min_port — Specifies the lowest possible port sent to the
FTP
clients for passive mode connections. This setting is used to limit the port range so that firewall rules are easier to create.The default value is 0, which does not limit the lowest passive port range. The value must not be lower 1024.
-
pasv_promiscuous — When enabled, data connections are not checked to make sure they are originating from the same
IP
address. This setting is only useful for certain types of tunneling.Avoid enabling the pasv_promiscuous optionDo not enable this option unless absolutely necessary as it disables an important security feature which verifies that passive mode connections originate from the same
IP
address as the control connection that initiates the data transfer.The default value is NO.
-
port_enable — When enabled, active mode connects are allowed.
The default value is YES.
Sumber Daya Tambahan
For more information about vsftpd, refer to the following resources.
Dokumentasi Terpasang
-
The
/usr/share/doc/vsftpd/
directory — This directory contains aREADME
with basic information about the software. TheTUNING
file contains basic performance tuning tips and theSECURITY/
directory contains information about the security model employed by vsftpd. -
vsftpd related man pages — There are a number of man pages for the daemon and configuration files. The following lists some of the more important man pages.
- Aplikasi Server
-
-
man vsftpd — Describes available command line options for vsftpd.
-
- Berkas Konfigurasi
-
-
man vsftpd.conf — Contains a detailed list of options available within the configuration file for vsftpd.
-
man 5 hosts_access — Describes the format and options available within the TCP wrappers configuration files:
hosts.allow
andhosts.deny
.
-
Situs Web yang Berguna
-
https://security.appspot.com/vsftpd.html — The vsftpd project page is a great place to locate the latest documentation and to contact the author of the software.
-
https://slacksite.com/other/ftp.html — This website provides a concise explanation of the differences between active and passive mode
FTP
. -
https://www.ietf.org/rfc/rfc0959.txt — The original Request for Comments (RFC) of the
FTP
protocol from the IETF.
Konfigurasi Pencetak
Alat konfigurasi Pencetak berfungsi untuk mengonfigurasi pencetak, pemeliharaan berkas konfigurasi pencetak, direktori spool cetak dan filter cetak, dan manajemen kelas pencetak.
Alat ini didasarkan pada Common Unix Printing System (CUPS). Jika Anda memutakhirkan sistem dari versi Fedora sebelumnya yang menggunakan CUPS, proses peningkatan mempertahankan pencetak yang dikonfigurasi.
Menggunakan aplikasi web atau alat baris perintah CUPS
Anda dapat melakukan operasi yang sama dan tambahan pada pencetak langsung dari aplikasi web atau baris perintah CUPS. Untuk mengakses aplikasi, di peramban web, buka http://localhost:631/. Untuk manual CUPS, lihat tautan pada tab |
Memulai Alat Konfigurasi Pencetak
Dengan alat konfigurasi Pencetak, Anda dapat melakukan berbagai operasi pada pencetak yang ada dan menyiapkan pencetak baru. Anda juga dapat menggunakan CUPS secara langsung (buka http://localhost:631/ untuk mengakses aplikasi web CUPS).
Untuk memulai alat konfigurasi Pencetak jika menggunakan desktop GNOME, tekan tombol Super untuk memasukkan Ringkasan Aktivitas, ketik Pencetak, lalu tekan Enter. Alat konfigurasi Pencetak muncul. Tombol Super muncul dalam berbagai bentuk, tergantung pada papan ketik dan perangkat keras lainnya, tetapi sering kali sebagai tombol Windows atau Command, dan biasanya di sebelah kiri Spacebar.
Jendela Pencetak
yang digambarkan dalam Jendela Konfigurasi Pencetak muncul.
Memulai Penyiapan Pencetak
Proses penyiapan pencetak bervariasi tergantung pada jenis antrian pencetak.
Jika Anda mengatur pencetak lokal yang terhubung dengan USB, pencetak akan ditemukan dan ditambahkan secara otomatis. Anda akan diminta untuk mengonfirmasi paket yang akan dipasang dan memberikan kata sandi pengguna root
atau administrator. Pencetak lokal yang terhubung dengan jenis port lain dan pencetak jaringan perlu diatur secara manual.
Ikuti prosedur ini untuk memulai penyiapan pencetak manual:
-
Jalankan alat konfigurasi Pencetak (lihat Memulai Alat Konfigurasi Pencetak).
-
Pilih
Buka Kunci
untuk mengaktifkan perubahan yang akan dilakukan. Di kotakAutentikasi Diperlukan
, ketikkata sandi penggunaroot
atau administrator dan konfirmasikan. -
Pilih tanda plus untuk membuka dialog
Tambahkan Pencetak Baru
. Pilih pencetak dari daftar atau masukkan alamatnya di bawah ini.
Menambahkan Pencetak Lokal
Ikuti prosedur ini untuk menambahkan pencetak lokal yang terhubung dengan selain port serial:
-
Buka dialog
Tambhkan Pencetak Baru
(lihat Memulai Penyiapan Pencetak). -
Jika perangkat tidak muncul secara otomatis, pilih port tempat pencetak terhubung dalam daftar di sebelah kiri (seperti
Serial Port #1
atauLPT #1
). -
Di sebelah kanan, masukkan properti koneksi:
- untuk
Masukkan URI
-
URI
(misalnya file:/dev/lp0) - untuk
Port Serial
-
Baud Rate
- untuk
Paritas
Data Bit
Kendali Alir
-
Klik Maju.
-
Pilih model pencetak. Lihat Memilih Model pencetak dan Finishing untuk detailnya.
Menambahkan pencetak AppSocket/HP JetDirect
Ikuti prosedur ini untuk menambahkan pencetak AppSocket/HP JetDirect:
-
Buka dialog
Tambahkan Pencetak Baru
(lihat Memulai Alat Konfigurasi Pencetak). -
Dalam daftar di sebelah kiri, pilih
. -
Di sebelah kanan, masukkan pengaturan koneksi:
Nama host
-
Nama host pencetak atau alamat
IP
. Nomor Port
-
Port tempat pencetak mendengarkan pekerjaan pencetakan (
9100
secara baku).
-
Klik Maju.
-
Pilih model pencetak. Lihat Memilih Model pencetak dan Finishing untuk detailnya.
Menambahkan Pencetak IPP
Pencetak IPP
adalah pencetak yang terpasang pada sistem yang berbeda pada jaringan TCP/IP yang sama. Sistem tempat pencetak ini terpasang mungkin menjalankan CUPS atau hanya dikonfigurasi untuk menggunakan IPP
.
Jika firewall diaktifkan pada server pencetak, maka firewall harus dikonfigurasi untuk memungkinkan koneksi TCP
masuk pada port 631
. Perhatikan bahwa protokol penjelajahan CUPS memungkinkan komputer klien untuk menemukan antrean CUPS bersama secara otomatis. Untuk mengaktifkan ini, firewall pada komputer klien harus dikonfigurasi untuk memungkinkan paket UDP
masuk pada port 631
.
Ikuti prosedur ini untuk menambahkan pencetak IPP
:
-
Buka dialog
Pencetak
(lihat Memulai Penyiapan Pencetak). -
Dalam daftar perangkat di sebelah kiri, pilih Pencetak Jaringan dan
Internet Printing Protocol (ipp)
atauInternet Printing Protocol (https)
. -
Di sebelah kanan, masukkan pengaturan koneksi:
Host
-
Nama host pencetak
IPP
. Antrian
-
Nama antrian yang akan diberikan ke antrian baru (jika kotak dibiarkan kosong, nama berdasarkan node perangkat akan digunakan).
-
Secara opsional, klik Verifikasi untuk mendeteksi pencetak.
-
Klik Maju untuk melanjutkan.
-
Pilih model pencetak. Lihat Memilih Model pencetak dan Finishing untuk detailnya.
Menambahkan Host atau Pencetak LPD/LPR
Ikuti prosedur ini untuk menambahkan host atau pencetak LPD/LPR:
-
Buka dialog
Pencetak Baru
(lihat Memulai Penyiapan Pencetak). -
Dalam daftar perangkat di sebelah kiri, pilih
. -
Di sebelah kanan, masukkan pengaturan koneksi:
Host
-
Nama host pencetak atau host LPD/LPR.
Secara opsional, klik Probe untuk menemukan antrean pada host LPD.
Antrian
-
Nama antrian yang akan diberikan ke antrian baru (jika kotak dibiarkan kosong, nama berdasarkan node perangkat akan digunakan).
-
Klik Maju untuk melanjutkan.
-
Pilih model pencetak. Lihat Memilih Model pencetak dan Finishing untuk detailnya.
Menambahkan pencetak Samba (SMB)
Ikuti prosedur ini untuk menambahkan pencetak Samba:
Memasang paket samba-client
Perhatikan bahwa untuk menambahkan pencetak Samba, Anda harus memasang paket samba-client. Anda dapat melakukannya dengan menjalankan, sebagai dnf install samba-client
Untuk informasi lebih lanjut tentang memasang paket dengan DNF, lihat Memasang Paket. |
-
Buka dialog
Pencetak Baru
(lihat Memulai Penyiapan Pencetak). -
Dalam daftar di sebelah kiri, pilih
. -
Masukkan alamat SMB di bidang
smb://
. Gunakan format nama komputer/share pencetak. Dalam Menambahkan pencetak SMB, nama komputer adalah dellbox dan share pencetak adalah r2.
-
Klik Ramban untuk melihat grup/domain kerja yang tersedia. Untuk menampilkan hanya antrean host tertentu, ketik nama host (nama NetBios) dan klik Ramban.
-
Pilih salah satu opsi:
-
Minta pengguna jika autentikasi diperlukan
: nama pengguna dan kata sandi dikumpulkan dari pengguna saat mencetak dokumen. -
Atur detail autentikasi sekarang
: berikan informasi autentikasi sekarang sehingga tidak diperlukan nanti. Di bidangNama pengguna
, masukkan nama pengguna untuk mengakses pencetak. Pengguna ini harus ada pada sistem SMB, dan pengguna harus memiliki izin untuk mengakses pencetak. Nama pengguna baku biasanya adalahguest
untuk server Windows, ataunobody
untuk server Samba.
-
-
Masukkan
Kata Sandi
(jika diperlukan) untuk pengguna yang ditentukan di bidangNama Pengguna
.
Berhati-hatilah saat memilih kata sandi
Nama pengguna dan kata sandi pencetak Samba disimpan di server pencetak sebagai berkas yang tidak terenkripsi yang dapat dibaca oleh Oleh karena itu, ketika Anda memilih nama pengguna dan kata sandi untuk mengakses pencetak Samba, disarankan agar Anda memilih kata sandi yang berbeda dari apa yang Anda gunakan untuk mengakses sistem Fedora lokal Anda. Jika ada berkas yang dibagikan di server cetak Samba, disarankan agar mereka juga menggunakan kata sandi yang berbeda dari apa yang digunakan oleh antrian cetak. |
-
Klik Verifikasi untuk menguji koneksi. Setelah verifikasi berhasil, kotak dialog muncul mengonfirmasi aksesibilitas berbagi pencetak.
-
Klik Maju.
-
Pilih model pencetak. Lihat Memilih Model pencetak dan Finishing untuk detailnya.
Memilih Model Pencetak dan Menyelesaikan
Setelah Anda memilih jenis koneksi pencetak dengan benar, sistem mencoba untuk mendapatkan driver. Jika proses gagal, Anda dapat menemukan atau mencari sumber daya driver secara manual.
Ikuti prosedur ini untuk menyediakan driver pencetak dan menyelesaikan instalasi:
-
Di jendela yang ditampilkan setelah deteksi driver otomatis gagal, pilih salah satu opsi berikut:
-
Pilih pencetak dari basis data
— sistem memilih driver berdasarkan merek pencetak Anda yang dipilih dari daftarMerek
. Jika model pencetak Anda tidak tercantum, pilihGenerik
. -
Sediakan berkas PPD
— sistem menggunakan berkas PostScript Printer Description (PPD) yang disediakan untuk instalasi. Berkas PPD juga dapat dikirimkan dengan pencetak Anda seperti yang biasanya disediakan oleh pabrikan. Jika berkas PPD tersedia, Anda dapat memilih opsi ini dan menggunakan bilah peramban di bawah deskripsi opsi untuk memilih berkas PPD. -
Cari driver pencetak untuk diunduh
— masukkan merek dan model pencetak Anda ke dalam bidangMerek dan model
untuk mencari di OpenPrinting.org untuk paket yang sesuai.
-
-
Tergantung pada pilihan Anda sebelumnya, berikan detail di area yang ditampilkan di bawah ini:
-
Merek pencetak untuk opsi
Pilih pencetak dari basis data
. -
Lokasi berkas PPD untuk opsi
Berikan berkas PPD
. -
Merek dan model pencetak untuk opsi
Cari driver pencetak untuk diunduh
.
-
-
Klik Maju untuk melanjutkan.
-
Jika berlaku untuk opsi Anda, jendela yang ditampilkan di Memilih model pencetak akan muncul. Pilih model yang sesuai di kolom
Model
di sebelah kiri.
Memilih driver pencetak
Di sebelah kanan, driver pencetak yang disarankan dipilih secara otomatis; namun, Anda dapat memilih driver lain yang tersedia. Driver cetak memproses data yang ingin Anda cetak ke dalam format yang dapat dipahami pencetak. Karena pencetak lokal terpasang langsung ke komputer Anda, Anda memerlukan driver pencetak untuk memproses data yang dikirim ke pencetak. |
-
Klik Maju.
-
Di bawah
Jelaskan Pencetak
masukkan nama unik untuk pencetak di bidangNama Pencetak
. Nama pencetak dapat berisi huruf, angka, tanda hubung (-), dan garis bawah (_); itu tidak boleh berisi spasi apa pun. Anda juga dapat menggunakan bidangDeskripsi
danLokasi
untuk menambahkan informasi pencetak lebih lanjut. Kedua bidang bersifat opsional, dan mungkin berisi spasi.
-
Klik Terapkan untuk mengonfirmasi konfigurasi pencetak Anda dan menambahkan antrean cetak jika pengaturannya benar. Klik Mundur untuk mengubah konfigurasi pencetak.
-
Setelah perubahan diterapkan, kotak dialog muncul yang memungkinkan Anda mencetak halaman pengujian. Klik Cetak Halaman Uji untuk mencetak halaman pengujian sekarang. Atau, Anda dapat mencetak halaman pengujian nanti seperti yang dijelaskan dalam Mencetak Halaman Uji.
Mencetak Halaman Uji
Setelah Anda menyiapkan pencetak atau mengubah konfigurasi pencetak, cetak halaman pengujian untuk memastikan pencetak berfungsi dengan baik:
-
Klik kanan pencetak di jendela
Pencetakan
dan klikProperti
. -
Di jendela Properti, klik
Pengaturan
di sebelah kiri. -
Pada tab
Pengaturan
yang ditampilkan, klik tombol Cetak Halaman Uji.
Memodifikasi Pencetak yang Ada
Untuk menghapus pencetak yang ada, di jendela konfigurasi Pencetak
, pilih pencetak dan buka . Konfirmasikan penghapusan pencetak. Atau, tekan tombol Delete.
Untuk mengatur pencetak baku, klik kanan pencetak dalam daftar pencetak dan klik tombol Jadikan Baku
di menu konteks.
Halaman Pengaturan
Untuk mengubah konfigurasi driver pencetak, klik ganda nama yang sesuai dalam daftar Pencetak
dan klik label Pengaturan
di sebelah kiri untuk menampilkan halaman Pengaturan
.
Anda dapat mengubah pengaturan pencetak seperti merek dan model, mencetak halaman uji, mengubah lokasi perangkat (URI), dan banyak lagi.
Halaman Kebijakan
Klik tombol Kebijakan
di sebelah kiri untuk mengubah pengaturan dalam status pencetak dan mencetak keluaran.
Anda dapat memilih status pencetak, mengonfigurasi Kebijakan Kesalahan
pencetak (Anda dapat memutuskan untuk membatalkan pekerjaan pencetakan, mencoba lagi, atau menghentikannya jika terjadi kesalahan).
Anda juga dapat membuat halaman banner (halaman yang menjelaskan aspek-aspek pekerjaan pencetakan seperti pencetak asal, nama pengguna dari mana pekerjaan itu berasal, dan status keamanan dokumen yang sedang dicetak): klik menu tarik-turun Banner Awalan
atau Banner Akhiran
dan pilih opsi yang paling menggambarkan sifat pekerjaan pencetakan (misalnya, rahasia
).
Pada halaman Kebijakan
, Anda dapat menandai pencetak sebagai dipakai bersama: jika pencetak dibagikan, pengguna yang dipublikasikan di jaringan dapat menggunakannya. Untuk mengizinkan fungsi berbagi untuk pencetak, buka dan pilih Publikasikan pencetak yang dibagikan yang tersambung ke sistem ini
.
Pastikan bahwa firewall memungkinkan koneksi TCP
yang masuk ke port 631
, port untuk protokol Network Printing Server (IPP
). Untuk mengizinkan lalu lintas IPP
melalui firewall pada Fedora 37, manfaatkan layanan IPP
firewalld
. Untuk melakukannya, lanjutkan sebagai berikut:
-
Untuk memulai alat grafis firewall-config, tekan tombol Super untuk memasukkan Gambaran Umum Aktivitas, ketik firewall lalu tekan Enter. Jendela
Konfigurasi Firewall
terbuka. Anda akan dimintai kata sandi administrator atauroot
.
Atau, untuk memulai alat konfigurasi firewall grafis menggunakan baris perintah, masukkan perintah berikut sebagai pengguna root
:
~]# firewall-config
Jendela Konfigurasi Firewall
terbuka.
Cari kata “Terhubung” di sudut kiri bawah. Ini menunjukkan bahwa alat firewall-config terhubung ke daemon ruang pengguna, firewalld
.
Untuk segera mengubah pengaturan firewall saat ini, pastikan menu pemilihan drop-down berlabel Konfigurasi
diatur ke Runtime
. Atau, untuk mengedit pengaturan yang akan diterapkan pada awal sistem berikutnya, atau memuat ulang firewall, pilih Permanen
dari daftar drop-down.
-
Pilih tab
Zona
dan kemudian pilih zona firewall agar sesuai dengan antarmuka jaringan yang akan digunakan. Defaultnya adalah zonapublik
. TabAntarmuka
menunjukkan antarmuka apa yang telah ditetapkan ke zona. -
Pilih tab
Layanan
dan kemudian pilih layananipp
untuk mengaktifkan berbagi. Layananipp-client
diperlukan untuk mengakses pencetak jaringan. -
Tutup alat firewall-config.
Anda dapat mengubah akses tingkat pengguna ke pencetak yang dikonfigurasi di halaman Kontrol Akses
. Klik label Kontrol Akses
di sebelah kiri untuk menampilkan halaman. Pilih Izinkan pencetakan untuk semua orang kecuali pengguna ini
atau Tolak pencetakan untuk semua orang kecuali pengguna ini
dan tentukan set pengguna di bawah ini: masukkan nama pengguna di kotak teks dan klik tombol Tambah untuk menambahkan pengguna ke set pengguna.
Halaman Opsi Pencetak
berisi berbagai opsi konfigurasi untuk media dan keluaran pencetak, dan kontennya dapat bervariasi dari pencetak ke pencetak. Ini berisi pengaturan pencetakan umum, kertas, kualitas, dan ukuran pencetakan.
Pada halaman Opsi Pekerjaan
, Anda dapat merinci opsi pekerjaan pencetak. Klik label Opsi Pekerjaan
di sebelah kiri untuk menampilkan halaman. Sunting pengaturan baku untuk menerapkan opsi pekerjaan ubahan, seperti cacah salinan, orientasi, halaman per sisi, penskalaan (menambah atau mengurangi ukuran area yang dapat dicetak, yang dapat digunakan untuk menyesuaikan area cetak berukuran besar ke lembar fisik media cetak yang lebih kecil), opsi teks terperinci, dan opsi pekerjaan khusus.
Halaman Level Tinta/Toner
berisi detail tentang status toner jika tersedia dan pesan status pencetak. Klik label Level Tinta/Toner
di sebelah kiri untuk menampilkan halaman.
Mengelola Pekerjaan Cetak
Saat Anda mengirim pekerjaan pencetakan ke daemon pencetak, seperti mencetak berkas teks dari Emacs atau mencetak gambar dari GIMP, pekerjaan pencetakan ditambahkan ke antrean spool cetak. Antrian spool cetak adalah daftar pekerjaan pencetakan yang telah dikirim ke pencetak dan informasi tentang setiap permintaan cetak, seperti status permintaan, nomor pekerjaan, dan banyak lagi.
Selama proses pencetakan, pesan yang menginformasikan tentang proses muncul di area notifikasi.
Untuk membatalkan, menahan, melepaskan, mencetak ulang, atau mengautentikasi pekerjaan pencetakan, pilih pekerjaan di Status Cetak GNOME dan pada menu Pekerjaan, klik perintah masing-masing.
Untuk melihat daftar pekerjaan pencetakan di spool cetak dari prompt shell, ketik perintah lpstat -o. Beberapa baris terakhir terlihat mirip dengan yang berikut ini:
$ lpstat -o
Charlie-60 twaugh 1024 Tue 08 Feb 2011 16:42:11 GMT
Aaron-61 twaugh 1024 Tue 08 Feb 2011 16:42:44 GMT
Ben-62 root 1024 Tue 08 Feb 2011 16:45:42 GMT
Jika Anda ingin membatalkan pekerjaan pencetakan, temukan nomor pekerjaan permintaan dengan perintah lpstat -o lalu gunakan perintah cancel job number. Misalnya, cancel 60 akan membatalkan pekerjaan pencetakan di Contoh keluaran lpstat -o. Anda tidak dapat membatalkan pekerjaan pencetakan yang dimulai oleh pengguna lain dengan perintah cancel. Namun, Anda dapat memberlakukan penghapusan pekerjaan tersebut dengan mengeluarkan perintah cancel -U root job_number. Untuk mencegah pembatalan tersebut, ubah kebijakan operasi pencetak menjadi Diautentikasi
untuk memaksa autentikasi root
.
Anda juga dapat mencetak berkas langsung dari shell prompt. Misalnya, perintah lp sample.txt mencetak berkas teks sample.txt
. Filter cetak menentukan jenis berkas apa itu dan mengubahnya menjadi format yang dapat dipahami pencetak.
Sumber Daya Tambahan
Untuk mempelajari selengkapnya tentang mencetak di Fedora, lihat sumber daya berikut ini.
Dokumentasi Terpasang
- man lp
-
Halaman manual untuk perintah lpr yang memungkinkan Anda mencetak berkas dari baris perintah.
- man cancel
-
Halaman manual untuk utilitas baris perintah untuk menghapus pekerjaan pencetakan dari antrian cetak.
- man mpage
-
Halaman manual untuk utilitas baris perintah untuk mencetak beberapa halaman pada satu lembar kertas.
- man cupsd
-
Halaman manual untuk daemon pencetak CUPS.
- man cupsd.conf
-
Halaman manual untuk berkas konfigurasi daemon pencetak CUPS.
- man classes.conf
-
Halaman manual untuk berkas konfigurasi kelas untuk CUPS.
- man lpstat
-
Halaman manual untuk perintah lpstat, yang menampilkan informasi status tentang kelas, pekerjaan, dan pencetak.
Situs Web yang Berguna
- https://wiki.linuxfoundation.org/openprinting/start
-
Open Printing berisi sejumlah besar informasi tentang pencetakan di Linux.
- https://www.cups.org/
-
Dokumentasi, FAQ, dan newsgroup tentang CUPS.
Want to help? Learn how to contribute to Fedora Docs ›