msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2022-07-30 18:23+0200\n"
"PO-Revision-Date: 2015-10-06 16:10+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"Language: en-US \n"
"MIME-Version: 1.0\n"
"Content-Type: application/x-publican; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Publican v4.3.2\n"
msgid "System boot"
msgstr ""
msgid "Initscripts"
msgstr ""
msgid "SSH"
msgstr ""
msgid "Telnet"
msgstr ""
msgid "Rights"
msgstr ""
msgid "Permissions"
msgstr ""
msgid "Supervision"
msgstr ""
msgid "Inetd"
msgstr ""
msgid "Cron"
msgstr ""
msgid "Backup"
msgstr ""
msgid "Hotplug"
msgstr ""
msgid "PCMCIA"
msgstr ""
msgid "APM"
msgstr ""
msgid "ACPI"
msgstr ""
msgid "Unix Services"
msgstr ""
msgid "This chapter covers a number of basic services that are common to many Unix systems. All administrators should be familiar with them."
msgstr ""
msgid "System Boot"
msgstr ""
msgid "bootingthe system"
msgstr ""
msgid "BIOS"
msgstr ""
msgid "MBR"
msgstr ""
msgid "ESP"
msgstr ""
msgid "Compatibility Support ModeCSM"
msgstr ""
msgid "CSM"
msgstr ""
msgid "When you boot the computer, the many messages scrolling by on the console display many automatic initializations and configurations that are being executed. Sometimes you may wish to slightly alter how this stage works, which means that you need to understand it well. That is the purpose of this section."
msgstr ""
msgid "On systems with a BIOS, first, the BIOS takes control of the computer, initializes the controllers and hardware, detects the disks, and bridges everything together. Then it looks up the Master Boot Record (MBR) of the first disk in the boot order and loads the code stored there (first stage). This code then launches the second stage and finally executes the bootloader."
msgstr ""
msgid "In contrast to the BIOS, UEFI is more sophisticated, it knows filesystems and can read the partition tables. The interface searches the system storage for a partition labeled with a specific globally unique identifier (GUID) that marks it as the EFI System Partition (ESP), where the bootloaders, boot managers, UEFI shell, etc., are located, and launches the desired bootloader. If Secure Boot is enabled, the boot process will verify authenticity of the EFI binaries there by signature (thus grub-efi-arch-signed is required in this case). The UEFI specification also defines support for booting in legacy BIOS mode. This is called the Compatibility Support Module (CSM). If CSM is enabled, it will attempt to boot from a drive's MBR. However, many new systems do no longer support the CSM mode."
msgstr ""
msgid "In both cases then the actual bootloader takes over, finds either a chained bootloader or the kernel on the disk, loads, and executes it. The kernel is then initialized, and starts to search for and mount the partition containing the root filesystem, and finally executes the first program — init. Frequently, this “root partition” and this init are, in fact, located in a virtual filesystem that only exists in RAM (hence its name, “initramfs”, formerly called “initrd” for “initialization RAM disk”). This filesystem is loaded in memory by the bootloader, often from a file on a hard drive or from the network. It contains the bare minimum required by the kernel to load the “true” root filesystem: this may be driver modules for the hard drive, or other devices without which the system cannot boot, or, more frequently, initialization scripts and modules for assembling RAID arrays, opening encrypted partitions, activating LVM volumes, etc. Once the root partition is mounted, the initramfs hands over control to the real init, and the machine goes back to the standard boot process."
msgstr ""
msgid "The systemd init system"
msgstr ""
msgid "initsystemd"
msgstr ""
msgid "The “real init” is currently provided by systemd and this section documents this init system."
msgstr ""
msgid "CULTURE Before systemd"
msgstr ""
msgid "initsysv-rcSystem V init"
msgstr ""
msgid "System V init"
msgstr ""
msgid "systemd is a relatively recent “init system”, and although it was already available, to a certain extent, in Wheezy, it has only become the default in Debian Jessie. Previous releases relied, by default, on the “System V init” (in the sysv-rc package), a much more traditional system. We describe the System V init later on."
msgstr ""
msgid "ALTERNATIVE Other boot systems"
msgstr ""
msgid "boot systemsinit"
msgstr ""
msgid "This book describes the boot system used by default in Debian since Buster (as implemented by the systemd package), as well as the previous default, sysvinit, which is derived and inherited from System V Unix systems; there are others."
msgstr ""
msgid "initupstart"
msgstr ""
msgid "The upstart system is still not perfectly tested on Debian. It is event based: init scripts are no longer executed in a sequential order but in response to events such as the completion of another script upon which they are dependent. This system, started by Ubuntu, was present in Debian Jessie, but was not the default; it came, in fact, as a replacement for sysvinit, and one of the tasks launched by upstart was to launch the scripts written for traditional systems, especially those from the sysv-rc package."
msgstr ""
msgid "initopenrc"
msgstr ""
msgid "openrc is a dependency based service manager. It was originally written for the Gentoo project, but it aims at being platform agnostic. It maintains compatibility with the System V init system and provides support for booting, changing runlevels, starting and stopping services (in parallel), and shutting down."
msgstr ""
msgid "There are also other systems and other operating modes, such as file-rc, runit, or minit, but some of them are relatively specialized and not widespread."
msgstr ""
msgid "Boot sequence of a computer running Linux with systemd"
msgstr ""
msgid "SPECIFIC CASE Booting from the network"
msgstr ""
msgid "In some configurations, the system may be configured not to execute code from the physical hardware, but to seek its equivalent on the network, making it possible to build computers without a hard drive, or which are completely reinstalled on each boot. This option is not available on all hardware and it generally requires an appropriate combination of firmware and network card."
msgstr ""
msgid "Booting from the network can be used to launch the debian-installer or FAI (see )."
msgstr ""
msgid "BACK TO BASICS The process, a program instance"
msgstr ""
msgid "process"
msgstr ""
msgid "A process is the representation of a running program in memory. It includes all of the information necessary for the proper execution of the software (the code itself, but also the data that it has in memory, the list of files that it has opened, the network connections it has established, etc.). A single program may be instantiated into several processes, not necessarily running under different user IDs."
msgstr ""
msgid "SECURITY Using a shell as init to gain root rights"
msgstr ""
msgid "By convention, the first process that is booted is the init program (which is a symbolic link to /lib/systemd/systemd by default). However, it is possible to pass an init option to the kernel indicating a different program."
msgstr ""
msgid "init"
msgstr ""
msgid "Any person who is able to access the computer can press the Reset button, and thus reboot it. Then, at the bootloader's prompt, it is possible to pass the init=/bin/sh option to the kernel to gain root access without knowing the administrator's password."
msgstr ""
msgid "To prevent this, you can protect the bootloader itself with a password. You might also think about protecting access to the BIOS (a password protection mechanism is almost always available), without which a malicious intruder could still boot the machine on a removable media containing its own Linux system, which they could then use to access data on the computer's hard drives."
msgstr ""
msgid "Finally, be aware that most BIOS/EFI implementations have a generic password available. Initially intended for troubleshooting for those who have forgotten their password, these passwords are now public and available on the Internet (see for yourself by searching for “generic BIOS passwords” in a search engine). All of these protections will thus impede unauthorized access to the machine without being able to completely prevent it. There is no reliable way to protect a computer if the attacker can physically access it; they could dismount the hard drives to connect them to a computer under their own control anyway, or even steal the entire machine, or erase the BIOS memory to reset the password…"
msgstr ""
msgid "Systemd executes several processes, in charge of setting up the system: keyboard, drivers, filesystems, network, services. It does this while keeping a global view of the system as a whole, and the requirements of the components. Each component is described by a “unit file” (sometimes more); the general syntax is derived from the widely-used “*.ini files“ syntax, with key = value pairs grouped between [section] headers. Unit files are stored under /lib/systemd/system/ and /etc/systemd/system/; they come in several flavors, but we will focus on “services” and “targets” here."
msgstr ""
msgid "systemd.service file"
msgstr ""
msgid "/etc/etc/systemd/system/systemd"
msgstr ""
msgid "servicessh.service"
msgstr ""
msgid "A systemd “.service file” describes a process managed by systemd. It contains roughly the same information as old-style init-scripts, but expressed in a declaratory (and much more concise) way. Systemd handles the bulk of the repetitive tasks (starting and stopping the process, checking its status, logging, dropping privileges, and so on), and the service file only needs to fill in the specifics of the process. For instance, here is the service file for SSH:"
msgstr ""
msgid ""
"[Unit]\n"
"Description=OpenBSD Secure Shell server\n"
"Documentation=man:sshd(8) man:sshd_config(5)\n"
"After=network.target auditd.service\n"
"ConditionPathExists=!/etc/ssh/sshd_not_to_be_run\n"
"\n"
"[Service]\n"
"EnvironmentFile=-/etc/default/ssh\n"
"ExecStartPre=/usr/sbin/sshd -t\n"
"ExecStart=/usr/sbin/sshd -D $SSHD_OPTS\n"
"ExecReload=/usr/sbin/sshd -t\n"
"ExecReload=/bin/kill -HUP $MAINPID\n"
"KillMode=process\n"
"Restart=on-failure\n"
"RestartPreventExitStatus=255\n"
"Type=notify\n"
"RuntimeDirectory=sshd\n"
"RuntimeDirectoryMode=0755\n"
"\n"
"[Install]\n"
"WantedBy=multi-user.target\n"
"Alias=sshd.service"
msgstr ""
msgid "The [Unit] section contains generic information about the service, like its description and manual page resources, as well as relations (dependency and order) to other services. The [Service] part contains the declarations related to the service execution (starting, stopping, killing, restarting), directories and configuration file(s) used. The last section, [Install], again carries generic information into which targets to install the service and, in this case, the alias that can be used instead of the service name. As you can see, there is very little code in there, only declarations. Systemd takes care of displaying progress reports, keeping track of the processes, and even restarting them when needed. The syntax of these files is fully described in several manual pages (e.g. systemd.service 5, systemd.unit 5, systemd.exec 5, etc.)."
msgstr ""
msgid "systemd.target file"
msgstr ""
msgid "A systemd “.target file” describes a state of the system where a set of services are known to be operational. It can be thought of as an equivalent of the old-style runlevel. One of the pre-defined targets is local-fs.target; when it is reached, the rest of the system can assume that all local filesystems are mounted and accessible. Other targets include network-online.target and sound.target (for a full list of special targets see systemd.special 7). The dependencies of a target can be listed either within the target file (in the Requires= line), or using a symbolic link to a service file in the /lib/systemd/system/targetname.target.wants/ directory. For instance, /etc/systemd/system/printer.target.wants/ contains a link to /lib/systemd/system/cups.service; systemd will therefore ensure CUPS is running in order to reach printer.target."
msgstr ""
msgid "Since unit files are declarative rather than scripts or programs, they cannot be run directly, and they are only interpreted by systemd; several utilities therefore allow the administrator to interact with systemd and control the state of the system and of each component."
msgstr ""
msgid "systemdsystemctlsystemctl"
msgstr ""
msgid "systemctlstatus"
msgstr ""
msgid "The first such utility is systemctl. When run without any arguments, it lists all the unit files known to systemd (except those that have been disabled), as well as their status. systemctl status gives a better view of the services, as well as the related processes. If given the name of a service (as in systemctl status ntp.service), it returns even more details, as well as the last few log lines related to the service (more on that later)."
msgstr ""
msgid "systemctlstart"
msgstr ""
msgid "systemctlstop"
msgstr ""
msgid "systemctlreload"
msgstr ""
msgid "systemctlrestart"
msgstr ""
msgid "Starting a service by hand is a simple matter of running systemctl start servicename.service. As one can guess, stopping the service is done with systemctl stop servicename.service; other subcommands include reload and restart."
msgstr ""
msgid "systemctlenable"
msgstr ""
msgid "systemctldisable"
msgstr ""
msgid "systemctlis-enabled"
msgstr ""
msgid "To control whether a service is active (i.e. whether it will get started automatically on boot), use systemctl enable servicename.service (or disable). is-enabled allows checking the status of the service."
msgstr ""
msgid "systemdjournaldjournald"
msgstr ""
msgid "systemdjournalctljournalctl"
msgstr ""
msgid "journald"
msgstr ""
msgid "syslogd"
msgstr ""
msgid "journalctl"
msgstr ""
msgid "An interesting feature of systemd is that it includes a logging component named journald. It comes as a complement to more traditional logging systems such as syslogd, but it adds interesting features such as a formal link between a service and the messages it generates, and the ability to capture error messages generated by its initialization sequence. The messages can be displayed later on, with a little help from the journalctl command. Without any arguments, it simply spews all log messages that occurred since system boot; it will rarely be used in such a manner. Most of the time, it will be used with a service identifier:"
msgstr ""
msgid ""
"# journalctl -u ssh.service\n"
"-- Logs begin at Tue 2015-03-31 10:08:49 CEST, end at Tue 2015-03-31 17:06:02 CEST. --\n"
"Mar 31 10:08:55 mirtuel sshd[430]: Server listening on 0.0.0.0 port 22.\n"
"Mar 31 10:08:55 mirtuel sshd[430]: Server listening on :: port 22.\n"
"Mar 31 10:09:00 mirtuel sshd[430]: Received SIGHUP; restarting.\n"
"Mar 31 10:09:00 mirtuel sshd[430]: Server listening on 0.0.0.0 port 22.\n"
"Mar 31 10:09:00 mirtuel sshd[430]: Server listening on :: port 22.\n"
"Mar 31 10:09:32 mirtuel sshd[1151]: Accepted password for roland from 192.168.1.129 port 53394 ssh2\n"
"Mar 31 10:09:32 mirtuel sshd[1151]: pam_unix(sshd:session): session opened for user roland by (uid=0)\n"
""
msgstr ""
msgid "Another useful command-line flag is -f, which instructs journalctl to keep displaying new messages as they are emitted (much in the manner of tail -f file)."
msgstr ""
msgid "If a service doesn't seem to be working as expected, the first step to solve the problem is to check that the service is actually running with systemctl status; if it is not, and the messages given by the first command are not enough to diagnose the problem, check the logs gathered by journald about that service. For instance, assume the SSH server doesn't work:"
msgstr ""
msgid ""
"# systemctl status ssh.service\n"
"● ssh.service - OpenBSD Secure Shell server\n"
" Loaded: loaded (/lib/systemd/system/ssh.service; enabled)\n"
" Active: failed (Result: start-limit) since Tue 2015-03-31 17:30:36 CEST; 1s ago\n"
" Process: 1023 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)\n"
" Process: 1188 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255)\n"
" Main PID: 1188 (code=exited, status=255)\n"
"\n"
"Mar 31 17:30:36 mirtuel systemd[1]: ssh.service: main process exited, code=exited, status=255/n/a\n"
"Mar 31 17:30:36 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"Mar 31 17:30:36 mirtuel systemd[1]: ssh.service start request repeated too quickly, refusing to start.\n"
"Mar 31 17:30:36 mirtuel systemd[1]: Failed to start OpenBSD Secure Shell server.\n"
"Mar 31 17:30:36 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"# journalctl -u ssh.service\n"
"-- Logs begin at Tue 2015-03-31 17:29:27 CEST, end at Tue 2015-03-31 17:30:36 CEST. --\n"
"Mar 31 17:29:27 mirtuel sshd[424]: Server listening on 0.0.0.0 port 22.\n"
"Mar 31 17:29:27 mirtuel sshd[424]: Server listening on :: port 22.\n"
"Mar 31 17:29:29 mirtuel sshd[424]: Received SIGHUP; restarting.\n"
"Mar 31 17:29:29 mirtuel sshd[424]: Server listening on 0.0.0.0 port 22.\n"
"Mar 31 17:29:29 mirtuel sshd[424]: Server listening on :: port 22.\n"
"Mar 31 17:30:10 mirtuel sshd[1147]: Accepted password for roland from 192.168.1.129 port 38742 ssh2\n"
"Mar 31 17:30:10 mirtuel sshd[1147]: pam_unix(sshd:session): session opened for user roland by (uid=0)\n"
"Mar 31 17:30:35 mirtuel sshd[1180]: /etc/ssh/sshd_config line 28: unsupported option \"yess\".\n"
"Mar 31 17:30:35 mirtuel systemd[1]: ssh.service: main process exited, code=exited, status=255/n/a\n"
"Mar 31 17:30:35 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"Mar 31 17:30:35 mirtuel sshd[1182]: /etc/ssh/sshd_config line 28: unsupported option \"yess\".\n"
"Mar 31 17:30:35 mirtuel systemd[1]: ssh.service: main process exited, code=exited, status=255/n/a\n"
"Mar 31 17:30:35 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"Mar 31 17:30:35 mirtuel sshd[1184]: /etc/ssh/sshd_config line 28: unsupported option \"yess\".\n"
"Mar 31 17:30:35 mirtuel systemd[1]: ssh.service: main process exited, code=exited, status=255/n/a\n"
"Mar 31 17:30:35 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"Mar 31 17:30:36 mirtuel sshd[1186]: /etc/ssh/sshd_config line 28: unsupported option \"yess\".\n"
"Mar 31 17:30:36 mirtuel systemd[1]: ssh.service: main process exited, code=exited, status=255/n/a\n"
"Mar 31 17:30:36 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"Mar 31 17:30:36 mirtuel sshd[1188]: /etc/ssh/sshd_config line 28: unsupported option \"yess\".\n"
"Mar 31 17:30:36 mirtuel systemd[1]: ssh.service: main process exited, code=exited, status=255/n/a\n"
"Mar 31 17:30:36 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"Mar 31 17:30:36 mirtuel systemd[1]: ssh.service start request repeated too quickly, refusing to start.\n"
"Mar 31 17:30:36 mirtuel systemd[1]: Failed to start OpenBSD Secure Shell server.\n"
"Mar 31 17:30:36 mirtuel systemd[1]: Unit ssh.service entered failed state.\n"
"# vi /etc/ssh/sshd_config\n"
"# systemctl start ssh.service\n"
"# systemctl status ssh.service\n"
"● ssh.service - OpenBSD Secure Shell server\n"
" Loaded: loaded (/lib/systemd/system/ssh.service; enabled)\n"
" Active: active (running) since Tue 2015-03-31 17:31:09 CEST; 2s ago\n"
" Process: 1023 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)\n"
" Main PID: 1222 (sshd)\n"
" CGroup: /system.slice/ssh.service\n"
" └─1222 /usr/sbin/sshd -D\n"
"# "
msgstr ""
msgid "After checking the status of the service (failed), we went on to check the logs; they indicate an error in the configuration file. After editing the configuration file and fixing the error, we restart the service, then verify that it is indeed running."
msgstr ""
msgid "GOING FURTHER Other types of unit files"
msgstr ""
msgid "We have only described the most basic of systemd's capabilities in this section. It offers many other interesting features; we will only list a few here:"
msgstr ""
msgid "systemd.socket file"
msgstr ""
msgid "socket activation: a “socket” unit file can be used to describe a network or Unix socket managed by systemd; this means that the socket will be created by systemd, and the actual service may be started on demand when an actual connection attempt comes. This roughly replicates the feature set of inetd. See systemd.socket 5."
msgstr ""
msgid "systemd.timer file"
msgstr ""
msgid "timers: a “timer” unit file describes events that occur with a fixed frequency or on specific times; when a service is linked to such a timer, the corresponding task will be executed whenever the timer fires. This allows replicating part of the cron features. See systemd.timer 5."
msgstr ""
msgid "systemd.network file"
msgstr ""
msgid "network: a “network“ unit file describes a network interface, which allows configuring such interfaces as well as expressing that a service depends on one particular interface being up. See systemd.network 5."
msgstr ""
msgid "The System V init system"
msgstr ""
msgid "The System V init system (which we'll call init for brevity) executes several processes, following instructions from the /etc/inittab file. The first program that is executed (which corresponds to the sysinit step) is /etc/init.d/rcS, a script that executes all of the programs in the /etc/rcS.d/ directory."
msgstr ""
msgid "/etc/etc/init.d/rcSsysv-rc"
msgstr ""
msgid "/etc/etc/rcS.d/sysv-rc"
msgstr ""
msgid "rcS"
msgstr ""
msgid "rcS.d"
msgstr ""
msgid "Among these, you will find successively programs in charge of:"
msgstr ""
msgid "configuring the console's keyboard;"
msgstr ""
msgid "loading drivers: most of the kernel modules are loaded by the kernel itself as the hardware is detected; extra drivers are then loaded automatically when the corresponding modules are listed in /etc/modules;"
msgstr ""
msgid "/etc/etc/modules"
msgstr ""
msgid "checking the integrity of filesystems;"
msgstr ""
msgid "mounting local partitions;"
msgstr ""
msgid "configuring the network;"
msgstr ""
msgid "mounting network filesystems (NFS)."
msgstr ""
msgid "BACK TO BASICS Kernel modules and options"
msgstr ""
msgid "moduleskernel modules"
msgstr ""
msgid "kernelmodules"
msgstr ""
msgid "kernelmodulesloadmodprobe"
msgstr ""
msgid "kernelmodulesoptionsmodinfo"
msgstr ""
msgid "/etc/etc/modprobe.d"
msgstr ""
msgid "/etc/etc/modules-load.d/"
msgstr ""
msgid "You have already learned that kernel modules can be loaded during the start of the system by adding them to /etc/modules or a file below /etc/modules-load.d/. But modules can also have options that can be configured by putting some files in /etc/modprobe.d/. These options are defined with directives like this: options module-name option-name=option-value. Several options can be specified with a single directive if necessary."
msgstr ""
msgid "These configuration files are intended for modprobe — the program that loads a kernel module with its dependencies (modules can indeed call other modules). To list all options of a module use the modinfo -p module command. Both programs are provided by the kmod package together with other tools to handle modules."
msgstr ""
msgid "modprobe"
msgstr ""
msgid "modinfo"
msgstr ""
msgid "kmod"
msgstr ""
msgid "Having learned about systemd, services and targets can use the modprobe@module.service to load kernel modules they depend on."
msgstr ""
msgid "servicemodprobe@module.service"
msgstr ""
msgid "/etc/etc/init.d/rc"
msgstr ""
msgid "/etc/etc/rcX.d/"
msgstr ""
msgid "insserv"
msgstr ""
msgid "After this stage, init takes over and starts the programs enabled in the default runlevel (which is usually runlevel 2). It executes /etc/init.d/rc 2, a script that starts all services which are listed in /etc/rc2.d/ and whose names start with the “S” letter. The two-figures number that follows had historically been used to define the order in which services had to be started, but nowadays the default boot system uses insserv, which schedules everything automatically based on the scripts' dependencies. Each boot script thus declares the conditions that must be met to start or stop the service (for example, if it must start before or after another service); init then launches them in the order that meets these conditions. The static numbering of scripts is therefore no longer taken into consideration (but they must always have a name beginning with “S” followed by two digits and the actual name of the script used for the dependencies). Generally, base services (such as logging with rsyslog, or port assignment with portmap) are started first, followed by standard services and the graphical interface (gdm3)."
msgstr ""
msgid "This dependency-based boot system makes it possible to automate re-numbering, which could be rather tedious if it had to be done manually, and it limits the risks of human error, since scheduling is conducted according to the parameters that are indicated. Another benefit is that services can be started in parallel when they are independent from one another, which can accelerate the boot process."
msgstr ""
msgid "runlevel"
msgstr ""
msgid "level, runlevel"
msgstr ""
msgid "telinit"
msgstr ""
msgid "init distinguishes several runlevels, so it can switch from one to another with the telinit new-level command. Immediately, init executes /etc/init.d/rc again with the new runlevel. This script will then start the missing services and stop those that are no longer desired. To do this, it refers to the content of the /etc/rcX.d (where X represents the new runlevel). Scripts starting with “S” (as in “Start”) are services to be started; those starting with “K” (as in “Kill”) are the services to be stopped. The script does not start any service that was already active in the previous runlevel."
msgstr ""
msgid "System V initrunlevels"
msgstr ""
msgid "By default, System V init in Debian uses four different runlevels:"
msgstr ""
msgid "Level 0 is only used temporarily, while the computer is powering down. As such, it only contains many “K” scripts."
msgstr ""
msgid "Level 1, also known as single-user mode, corresponds to the system in degraded mode; it includes only basic services, and is intended for maintenance operations where interactions with ordinary users are not desired."
msgstr ""
msgid "Level 2 is the level for normal operation, which includes networking services, a graphical interface, user logins, etc."
msgstr ""
msgid "Level 6 is similar to level 0, except that it is used during the shutdown phase that precedes a reboot."
msgstr ""
msgid "Other levels exist, especially 3 to 5. By default they are configured to operate the same way as level 2, but the administrator can modify them (by adding or deleting scripts in the corresponding /etc/rcX.d directories) to adapt them to particular needs."
msgstr ""
msgid "Boot sequence of a computer running Linux with System V init"
msgstr ""
msgid "initialization script"
msgstr ""
msgid "update-rc.d"
msgstr ""
msgid "rcconf"
msgstr ""
msgid "All the scripts contained in the various /etc/rcX.d directories are really only symbolic links — created upon package installation by the update-rc.d program — pointing to the actual scripts which are stored in /etc/init.d/. The administrator can fine tune the services available in each runlevel by re-running update-rc.d with adjusted parameters. The update-rc.d 1 manual page describes the syntax in detail. Please note that removing all symbolic links (with the remove parameter) is not a good method to disable a service. Instead you should simply configure it to not start in the desired runlevel (while preserving the corresponding calls to stop it in the event that the service runs in the previous runlevel). Since update-rc.d has a somewhat convoluted interface, you may prefer using rcconf (from the rcconf package) which provides a more user-friendly interface."
msgstr ""
msgid "DEBIAN POLICY Restarting services"
msgstr ""
msgid "invoke-rc.d"
msgstr ""
msgid "servicerestart"
msgstr ""
msgid "restarting services"
msgstr ""
msgid "The maintainer scripts for Debian packages will sometimes restart certain services to ensure their availability or get them to take certain options into account. The command that controls a service — service service operation — doesn't take runlevel into consideration, assumes (wrongly) that the service is currently being used, and may thus initiate incorrect operations (starting a service that was deliberately stopped, or stopping a service that is already stopped, etc.). Debian therefore introduced the invoke-rc.d program: this program must be used by maintainer scripts to run services initialization scripts and it will only execute the necessary commands. Note that, contrary to common usage, the .d suffix is used here in a program name, and not in a directory."
msgstr ""
msgid "Finally, init starts control programs for various virtual consoles (getty). It displays a prompt, waiting for a username, then executes login user to initiate a session."
msgstr ""
msgid "getty"
msgstr ""
msgid "servicegetty@.service"
msgstr ""
msgid "VOCABULARY Console and terminal"
msgstr ""
msgid "console"
msgstr ""
msgid "terminal"
msgstr ""
msgid "The first computers were usually separated into several, very large parts: the storage enclosure and the central processing unit were separate from the peripheral devices used by the operators to control them. These were part of a separate furniture, the “console”. This term was retained, but its meaning has changed. It has become more or less synonymous with “terminal”, being a keyboard and a screen."
msgstr ""
msgid "With the development of computers, operating systems have offered several virtual consoles to allow for several independent sessions at the same time, even if there is only one keyboard and screen. Most GNU/Linux systems offer six virtual consoles (in text mode), accessible by typing the key combinations Control Alt F1 through Control Alt F6 ."
msgstr ""
msgid "By extension, the terms “console” and “terminal” can also refer to a terminal emulator in a graphical session (such as xterm, gnome-terminal or konsole)."
msgstr ""
msgid "Remote Login"
msgstr ""
msgid "It is essential for an administrator to be able to connect to a computer remotely. Servers, confined in their own room, are rarely equipped with permanent keyboards and monitors — but they are connected to the network."
msgstr ""
msgid "BACK TO BASICS Client, server"
msgstr ""
msgid "clientclient/server architecture"
msgstr ""
msgid "serverclient/server architecture"
msgstr ""
msgid "A system where several processes communicate with each other is often described with the “client/server” metaphor. The server is the program that takes requests coming from a client and executes them. It is the client that controls operations, the server doesn't take any initiative of its own."
msgstr ""
msgid "loginremote login"
msgstr ""
msgid "remote login"
msgstr ""
msgid "Secure Remote Login: SSH"
msgstr ""
msgid "SSH"
msgstr ""
msgid "serverSSH"
msgstr ""
msgid "ssh"
msgstr ""
msgid "Secure ShellSSH"
msgstr ""
msgid "The SSH (Secure SHell) protocol was designed with security and reliability in mind. Connections using SSH are secure: the partner is authenticated and all data exchanges are encrypted."
msgstr ""
msgid "CULTURE Telnet and RSH are obsolete"
msgstr ""
msgid "telnet"
msgstr ""
msgid "rsh"
msgstr ""
msgid "Before SSH, Telnet and RSH were the main tools used to login remotely. They are now largely obsolete and should no longer be used even if Debian still provides them."
msgstr ""
msgid "VOCABULARY Authentication, encryption"
msgstr ""
msgid "When you need to give a client the ability to conduct or trigger actions on a server, security is important. You must ensure the identity of the client; this is authentication. This identity usually consists of a password or passphrase that must be kept secret, or any other client could it. This is the purpose of encryption, which is a form of encoding that allows two systems to communicate confidential information on a public channel while protecting it from being readable to others."
msgstr ""
msgid "Authentication and encryption are often mentioned together, both because they are frequently used together, and because they are usually implemented with similar mathematical concepts."
msgstr ""
msgid "scp"
msgstr ""
msgid "SSH also offers two file transfer services. scp is a command line tool that can be used like cp, except that any path to another machine is prefixed with the machine's name, followed by a colon."
msgstr ""
msgid "$ scp file machine:/tmp/"
msgstr ""
msgid "sftp"
msgstr ""
msgid "sftp is an interactive command, similar to ftp. In a single session, sftp can transfer several files, and it is possible to manipulate remote files with it (delete, rename, change permissions, etc.)."
msgstr ""
msgid "OpenSSHSSH"
msgstr ""
msgid "SSHOpenSSH"
msgstr ""
msgid "Debian uses OpenSSH, a free version of SSH maintained by the OpenBSD project (a free operating system based on the BSD kernel, focused on security) and fork of the original SSH software developed by the SSH Communications Security Corp company, of Finland. This company initially developed SSH as free software, but eventually decided to continue its development under a proprietary license. The OpenBSD project then created OpenSSH to maintain a free version of SSH."
msgstr ""
msgid "BACK TO BASICS Fork"
msgstr ""
msgid "fork"
msgstr ""
msgid "A “fork”, in the software field, means a new project that starts as a clone of an existing project, and that will compete with it. From there on, both software will usually quickly diverge in terms of new developments. A fork is often the result of disagreements within the development team."
msgstr ""
msgid "The option to fork a project is a direct result of the very nature of free software; a fork is a healthy event when it enables the continuation of a project as free software (for example in case of license changes). A fork arising from technical or personal disagreements is often a waste of human resources; another resolution would be preferable. Mergers of two projects that previously went through a prior fork are not unheard of."
msgstr ""
msgid "openssh-client"
msgstr ""
msgid "openssh-server"
msgstr ""
msgid "OpenSSH is split into two packages: the client part is in the openssh-client package, and the server is in the openssh-server package. The ssh meta-package depends on both parts and facilitates installation of both (apt install ssh), while the task-ssh-server, often chosen during the initial installation, depends on the server package only."
msgstr ""
msgid "Key-Based Authentication"
msgstr ""
msgid "SSHkey creation"
msgstr ""
msgid "Each time someone logs in over SSH, the remote server asks for a password to authenticate the user. This can be problematic if you want to automate a connection, or if you use a tool that requires frequent connections over SSH. This is why SSH offers a key-based authentication system."
msgstr ""
msgid "ssh-keygen"
msgstr ""
msgid "ssh-copy-id"
msgstr ""
msgid "The user generates a key pair on the client machine with ssh-keygen -t rsa; the so generated public key is stored in ~/.ssh/id_rsa.pub, while the corresponding private key is stored in ~/.ssh/id_rsa. The user can then use ssh-copy-id server to add their public key to the ~/.ssh/authorized_keys file on the server, or, if SSH access hasn't been enabled yet, they have to ask the administrator to add their key manually."
msgstr ""
msgid "SSHpassphrase cache"
msgstr ""
msgid "SSHpasswordless"
msgstr ""
msgid "SSHauthentication agent"
msgstr ""
msgid "ssh-agent"
msgstr ""
msgid "X.org/etc/X11/Xsession.options"
msgstr ""
msgid "If the private key was not protected with a “passphrase” at the time of its creation, all subsequent logins on the server will work without a password. Otherwise, the private key must be decrypted each time by entering the passphrase. Fortunately, ssh-agent allows us to keep private keys in memory to not have to regularly re-enter the password. For this, you simply use ssh-add (once per work session) provided that the session is already associated with a functional instance of ssh-agent. Debian activates it by default in graphical sessions, but this can be deactivated by changing /etc/X11/Xsession.options and commenting out use-ssh-agent. For a console session, you can manually start the agent with eval $(ssh-agent)."
msgstr ""
msgid "SECURITY Protection of the private key"
msgstr ""
msgid "SSHprivate key"
msgstr ""
msgid "Whoever has the private key can login on the account thus configured. This is why access to the private key is protected by a “passphrase”. Someone who acquires a copy of a private key file (for example, ~/.ssh/id_rsa) still has to know this phrase in order to be able to use it. This additional protection is not, however, impregnable, and if you think that this file has been compromised, it is best to disable that key on the computers in which it has been installed (by removing it from the authorized_keys files) and replacing it with a newly generated key."
msgstr ""
msgid "CULTURE OpenSSL flaw in Debian Etch"
msgstr ""
msgid "The OpenSSL library, as initially provided in Debian Etch, had a serious problem in its random number generator (RNG). Indeed, the Debian maintainer had made a change so that applications using it would no longer generate warnings when analyzed by memory testing tools like valgrind. Unfortunately, this change also meant that the RNG was employing only one source of entropy corresponding to the process number (PID) whose 32,000 possible values do not offer enough randomness. "
msgstr ""
msgid "ssh-vulnkey"
msgstr ""
msgid "openssh-blacklist"
msgstr ""
msgid "Specifically, whenever OpenSSL was used to generate a key, it always produced a key within a known set of hundreds of thousands of keys (32,000 multiplied by a small number of key lengths). This affected SSH keys, SSL keys, and X.509 certificates used by numerous applications, such as OpenVPN. A cracker had only to try all of the keys to gain unauthorized access. To reduce the impact of the problem, the SSH daemon was modified to refuse problematic keys that are listed in the openssh-blacklist and openssh-blacklist-extra packages. Additionally, the ssh-vulnkey command allows identification of possibly compromised keys in the system."
msgstr ""
msgid "A more thorough analysis of this incident brings to light that it is the result of multiple (small) problems, both within the OpenSSL project and with the Debian package maintainer. A widely used library like OpenSSL should — without modifications — not generate warnings when tested by valgrind. Furthermore, the code (especially the parts as sensitive as the RNG) should be better commented to prevent such errors. On Debian's side, the maintainer wanted to validate the modifications with the OpenSSL developers, but simply explained the modifications without providing the corresponding patch to review and failed to mention his role within Debian. Finally, the maintenance choices were sub-optimal: the changes made to the original code were not clearly documented; all the modifications were effectively stored in a Subversion repository, but they ended up all lumped into one single patch during creation of the source package."
msgstr ""
msgid "It is difficult under such conditions to find the corrective measures to prevent such incidents from recurring. The lesson to be learned here is that every divergence Debian introduces to upstream software must be justified, documented, submitted to the upstream project when possible, and widely publicized. It is from this perspective that the new source package format (“3.0 (quilt)”) and the Debian sources webservice were developed. "
msgstr ""
msgid "Cert-Based Authentication"
msgstr ""
msgid "SSHsigned key"
msgstr ""
msgid "SSHTrustedUserCAKeys"
msgstr ""
msgid "SSHHostCertificate"
msgstr ""
msgid "/etc/etc/ssh/sshd_config"
msgstr ""
msgid "/etc/etc/ssh/known_hosts"
msgstr ""
msgid "SSH keys cannot just be protected by a password (or not). An often unknown feature is that they can also be signed via certificate, both the host as well as the client keys. This approach comes with several advantages. Instead of maintaining an authorized_keys file per user as described in the previous section, the SSH server can be configured to trust all client keys signed by the same certificate (see also ) by using the TrustedUserCAKeys and HostCertificate directives in /etc/ssh/sshd_config."
msgstr ""
msgid ""
"\n"
"TrustedUserCAKeys /etc/ssh/ssh_users_ca.pub\n"
"\n"
"HostKey /etc/ssh/ssh_host_ecdsa_key\n"
"HostCertificate /etc/ssh/ssh_host_ecdsa_key-cert.pub"
msgstr ""
msgid "Vice-versa the clients can also be configured to trust the host key signed by the same authority, making it easier to maintain the known_hosts file (even system wide via /etc/ssh/known_hosts)."
msgstr ""
msgid "@cert-authority *.falcot.com ssh-rsa AAAA[..]"
msgstr ""
msgid "Both, public key and certificate authentication, can be used alongside each other."
msgstr ""
msgid "Using Remote X11 Applications"
msgstr ""
msgid "SSHX11Forwarding"
msgstr ""
msgid "SSHremote graphical applications"
msgstr ""
msgid "remote graphical application"
msgstr ""
msgid "application, remote graphical application"
msgstr ""
msgid "The SSH protocol allows forwarding of graphical data (“X11” session, from the name of the most widespread graphical system in Unix); the server then keeps a dedicated channel for those data. Specifically, a graphical program executed remotely can be displayed on the X.org server of the local screen, and the whole session (input and display) will be secure. Since this feature allows remote applications to interfere with the local system, it is disabled by default. You can enable it by specifying X11Forwarding yes in the server configuration file (/etc/ssh/sshd_config). Finally, the user must also request it by adding the -X option to the ssh command-line."
msgstr ""
msgid "GOING FURTHER Magic cookies in .Xauthority"
msgstr ""
msgid ".Xauthority"
msgstr ""
msgid "xauth"
msgstr ""
msgid "magic cookie"
msgstr ""
msgid "When a user connects via SSH and starts a remote X11 session, a so-called magic cookie is created and stored in the .Xauthority file in the user's home directory that initiated the connection. This cookie is used by xauth to authenticate the user during the X session. If the user impersonates another user on the system, e.g. using su or sudo, then the cookie is not copied automatically to the target user and the X server will refuse to start graphical applications under the target user's context. You will have to copy the magic cookie into the target user's home directory (by exporting and re-importing the cookie via xauth) to allow another user to start graphical programs as well during the X session."
msgstr ""
msgid "Creating Encrypted Tunnels with Port Forwarding"
msgstr ""
msgid "port forwarding"
msgstr ""
msgid "SSHport forwarding"
msgstr ""
msgid "SSHtunnel"
msgstr ""
msgid "Its -R and -L options allow ssh to create “encrypted tunnels” between two machines, securely forwarding a local TCP port (see sidebar ) to a remote machine or vice versa."
msgstr ""
msgid "VOCABULARY Tunnel"
msgstr ""
msgid "tunnelSSHVPN"
msgstr ""
msgid "SSHtunnelVPN"
msgstr ""
msgid "The Internet, and most LANs that are connected to it, operate in packet mode and not in connected mode, meaning that a packet issued from one computer to another is going to be stopped at several intermediary routers to find its way to its destination. You can still simulate a connected operation where the stream is encapsulated in normal IP packets. These packets follow their usual route, but the stream is reconstructed unchanged at the destination. We call this a “tunnel”, analogous to a road tunnel in which vehicles drive directly from the entrance (input) to the exit (output) without encountering any intersections, as opposed to a path on the surface that would involve intersections and changing direction."
msgstr ""
msgid "You can use this opportunity to add encryption to the tunnel: the stream that flows through it is then unrecognizable from the outside, but it is returned in decrypted form at the exit of the tunnel."
msgstr ""
msgid "ssh -L 8000:server:25 intermediary establishes an SSH session with the intermediary host and listens to local port 8000 (see ). For any connection established on this port, ssh will initiate a connection from the intermediary computer to port 25 on the server, and will bind both connections together."
msgstr ""
msgid "ssh -R 8000:server:25 intermediary also establishes an SSH session to the intermediary computer, but it is on this machine that ssh listens to port 8000 (see ). Any connection established on this port will cause ssh to open a connection from the local machine on to port 25 of the server, and to bind both connections together."
msgstr ""
msgid "In both cases, connections are made to port 25 on the server host, which pass through the SSH tunnel established between the local machine and the intermediary machine. In the first case, the entrance to the tunnel is local port 8000, and the data move towards the intermediary machine before being directed to the server on the “public” network. In the second case, the input and output in the tunnel are reversed; the entrance is port 8000 on the intermediary machine, the output is on the local host, and the data are then directed to the server. In practice, the server is usually either the local machine or the intermediary. That way SSH secures the connection from one end to the other."
msgstr ""
msgid "Forwarding a local port with SSH"
msgstr ""
msgid "Forwarding a remote port with SSH"
msgstr ""
msgid "Using Remote Graphical Desktops"
msgstr ""
msgid "VNC (Virtual Network Computing) allows remote access to graphical desktops."
msgstr ""
msgid "VNC"
msgstr ""
msgid "Virtual Network ComputingVNC"
msgstr ""
msgid "graphical desktopremote"
msgstr ""
msgid "remote graphical desktop"
msgstr ""
msgid "desktop, remote graphical desktop"
msgstr ""
msgid "This tool is mostly used for technical assistance; the administrator can see the errors that the user is facing, and show them the correct course of action without having to stand by them."
msgstr ""
msgid "VNCserver"
msgstr ""
msgid "serverVNC"
msgstr ""
msgid "vinoVNC"
msgstr ""
msgid "krfbVNC"
msgstr ""
msgid "x11vncVNC"
msgstr ""
msgid "tightvncserverVNC"
msgstr ""
msgid "tigervnc-standalone-serverVNC"
msgstr ""
msgid "First, the user must authorize sharing their session. The GNOME graphical desktop environment includes that option via Settings Sharing (contrary to previous versions of Debian, where the user had to install and run vino). For this to work network-manager must be managing the network used (e.g. enable the managed mode for devices handled by ifupdown in /etc/NetworkManager/NetworkManager.conf). KDE Plasma still requires using krfb to allow sharing an existing session over VNC. For other graphical desktop environments, the x11vnc or tightvncserver commands (from the Debian packages of the same name) or tigervncserver (tigervnc-standalone-server) serve the same purpose and provide the vnc-server virtual package; you can make either of them available to the user with an explicit menu or desktop entry."
msgstr ""
msgid "VNCclient"
msgstr ""
msgid "vinagreVNC"
msgstr ""
msgid "krdcVNC"
msgstr ""
msgid "xtightvncviewerVNC"
msgstr ""
msgid "tigervnc-viewerVNC"
msgstr ""
msgid "When the graphical session is made available by VNC, the administrator must connect to it with a VNC client. GNOME has vinagre and remmina for that, while the KDE project provides krdc (in the menu at K Internet Remote Desktop Client). There are other VNC clients that use the command line, such as xtightvncviewer from the homonym package or xtigervncviewer from the tigervnc-viewer Debian package. Once connected, the administrator can see what is going on, work on the machine remotely, and show the user how to proceed."
msgstr ""
msgid "SECURITY VNC over SSH"
msgstr ""
msgid "tunnelVNC"
msgstr ""
msgid "SSHtunnelVNC"
msgstr ""
msgid "vncviewer"
msgstr ""
msgid "If you want to connect by VNC, and you don't want your data sent in clear text on the network, it is possible to encapsulate the data in an SSH tunnel (see ). You simply have to know that VNC uses port 5900 by default for the first screen (called “localhost:0”), 5901 for the second (called “localhost:1”), etc."
msgstr ""
msgid "The ssh -L localhost:5901:localhost:5900 -N -T machine command creates a tunnel between local port 5901 in the localhost interface and port 5900 of the machine host. The first “localhost” restricts SSH to listening to only that interface on the local machine. The second “localhost” indicates the interface on the remote machine which will receive the network traffic entering in “localhost:5901”. Thus vncviewer localhost:1 will connect the VNC client to the remote screen, even though you indicate the name of the local machine."
msgstr ""
msgid "When the VNC session is closed, remember to close the tunnel by also quitting the corresponding SSH session."
msgstr ""
msgid "BACK TO BASICS Display manager"
msgstr ""
msgid "gdm3"
msgstr ""
msgid "kdm"
msgstr ""
msgid "xdm"
msgstr ""
msgid "lightdm"
msgstr ""
msgid "managerdisplay manager"
msgstr ""
msgid "display manager"
msgstr ""
msgid "gdm3, kdm, lightdm, and xdm are Display Managers (they all provide the x-display-manager meta package). They take control of the graphical interface shortly after boot in order to provide the user a login screen. Once the user has logged in, they execute the programs needed to start a graphical work session."
msgstr ""
msgid "/etc/etc/gdm3/daemon.conf"
msgstr ""
msgid "/etc/etc/inetd.conf"
msgstr ""
msgid "Managing Rights"
msgstr ""
msgid "permissions"
msgstr ""
msgid "rightspermissions"
msgstr ""
msgid "devicefiles"
msgstr ""
msgid "Linux is definitely a multi-user system, so it is necessary to provide a permission system to control the set of authorized operations on files and directories, which includes all the system resources and devices (on a Unix system, any device is represented by a file or directory). This principle is common to all Unix systems, but a reminder is always useful, especially as there are some interesting and relatively unknown advanced uses."
msgstr ""
msgid "Owners and Permissions"
msgstr ""
msgid "userowner"
msgstr ""
msgid "groupowner"
msgstr ""
msgid "owneruser"
msgstr ""
msgid "ownergroup"
msgstr ""
msgid "Each file or directory has specific permissions for three categories of users:"
msgstr ""
msgid "permissionsu"
msgstr ""
msgid "its owner (symbolized by u as in “user”);"
msgstr ""
msgid "permissionsg"
msgstr ""
msgid "its owner group (symbolized by g as in “group”), representing all the members of the group;"
msgstr ""
msgid "permissionso"
msgstr ""
msgid "the others (symbolized by o as in “other”)."
msgstr ""
msgid "Three basic types of rights can be combined:"
msgstr ""
msgid "permissionsr"
msgstr ""
msgid "reading (symbolized by r as in “read”);"
msgstr ""
msgid "permissionsw"
msgstr ""
msgid "writing (or modifying, symbolized by w as in “write”);"
msgstr ""
msgid "permissionsx"
msgstr ""
msgid "executing (symbolized by x as in “eXecute”)."
msgstr ""
msgid "read, right"
msgstr ""
msgid "write, right"
msgstr ""
msgid "modification, right"
msgstr ""
msgid "execution, right"
msgstr ""
msgid "permissionsread"
msgstr ""
msgid "permissionswrite"
msgstr ""
msgid "permissionsexecute"
msgstr ""
msgid "In the case of a file, these rights are easily understood: read access allows reading the content (including copying), write access allows changing it, and execute access allows you to run it (which will only work if it is a program)."
msgstr ""
msgid "SECURITY setuid and setgid executables"
msgstr ""
msgid "permissionssetuidsetuid"
msgstr ""
msgid "permissionssetgidsetgid"
msgstr ""
msgid "permissionss"
msgstr ""
msgid "Two particular rights are relevant to executable files: setuid and setgid (symbolized with the letter “s”). Note that we frequently speak of “bit”, since each of these Boolean values can be represented by a 0 or a 1. These two rights allow any user to execute the program with the rights of its owner or its group, respectively. This mechanism grants access to features requiring higher level permissions than those you would usually have."
msgstr ""
msgid "setuid, right"
msgstr ""
msgid "setgid, right"
msgstr ""
msgid "Since a setuid root program is systematically run under the super-user identity, it is very important to ensure it is secure and reliable. Indeed, a user who would manage to subvert it to call a command of their choice could then impersonate the root user and have all rights on the system."
msgstr ""
msgid "su"
msgstr ""
msgid "sudo"
msgstr ""
msgid "runuser"
msgstr ""
msgid "If you require running a program under a different user or if a program requires higher permissions, the sudo, su, or runuser commands are usually better choices than using these bits (see )."
msgstr ""
msgid "A directory is handled differently. Read access gives the right to consult the list of its entries (files and directories), write access allows creating or deleting files, and execute access allows crossing through it (especially to go there with the cd command). Being able to cross through a directory without being able to read it gives permission to access the entries therein that are known by name, but not to find them if you do not know their existence or their exact name."
msgstr ""
msgid "SECURITY setgid directory and sticky bit"
msgstr ""
msgid "setgid directory"
msgstr ""
msgid "The setgid bit also applies to directories. Any newly-created item in such directories is automatically assigned the owner group of the parent directory, instead of inheriting the creator's main group as usual. This setup avoids the user having to change its main group (with the newgrp command) when working in a file tree shared between several users of the same dedicated group."
msgstr ""
msgid "newgrp"
msgstr ""
msgid "sticky bit"
msgstr ""
msgid "permissionst"
msgstr ""
msgid "The “sticky” bit (symbolized by the letter “t”) is a permission that is only useful in directories. It is especially used for temporary directories where everybody has write access (such as /tmp/): it restricts deletion of files so that only their owner (or the owner of the parent directory) can do it. Lacking this, everyone could delete other users' files in /tmp/."
msgstr ""
msgid "Three commands control the permissions associated with a file:"
msgstr ""
msgid "chown"
msgstr ""
msgid "chown user file changes the owner of the file;"
msgstr ""
msgid "chgrp"
msgstr ""
msgid "chgrp group file alters the owner group;"
msgstr ""
msgid "chmod"
msgstr ""
msgid "chmod rights file changes the permissions for the file."
msgstr ""
msgid "symbolic representation of rights"
msgstr ""
msgid "rightssymbolic representation"
msgstr ""
msgid "permissionssymbolic representation"
msgstr ""
msgid "There are two ways of presenting rights. Among them, the symbolic representation is probably the easiest to understand and remember. It involves the letter symbols mentioned above. You can define rights for each category of users (u/g/o), by setting them explicitly (with =), by adding (+), or subtracting (-). Thus the u=rwx,g+rw,o-r formula gives the owner read, write, and execute rights, adds read and write rights for the owner group, and removes read rights for other users. Rights not altered by the addition or subtraction in such a command remain unmodified. The letter a, for “all”, covers all three categories of users, so that a=rx grants all three categories the same rights (read and execute, but not write)."
msgstr ""
msgid "octal representation of rights"
msgstr ""
msgid "rightsoctal representation"
msgstr ""
msgid "permissionsoctal representation"
msgstr ""
msgid "The (octal) numeric representation associates each right with a value: 4 for read, 2 for write, and 1 for execute. We associate each combination of rights with the sum of the figures. Each value is then assigned to different categories of users by putting them end to end in the usual order (owner, group, others)."
msgstr ""
msgid "For instance, the chmod 754 file command will set the following rights: read, write and execute for the owner (since 7 = 4 + 2 + 1); read and execute for the group (since 5 = 4 + 1); read-only for others. The 0 (zero) means no rights; thus chmod 600 file allows for read/write rights for the owner, and no rights for anyone else. The most frequent right combinations are 755 for executable files and directories, and 644 for data files."
msgstr ""
msgid "setuid"
msgstr ""
msgid "setgid"
msgstr ""
msgid "To represent special rights, you can prefix a fourth digit to this number according to the same principle, where the setuid, setgid and sticky bits are 4, 2 and 1, respectively. chmod 4754 will associate the setuid bit with the previously described rights."
msgstr ""
msgid "Note that the use of octal notation only allows to set all the rights at once on a file; you cannot use it to simply add a new right, such as read access for the group owner, since you must take into account the existing rights and compute the new corresponding numerical value."
msgstr ""
msgid "TIP Recursive operation"
msgstr ""
msgid "permissionsrecursive operation"
msgstr ""
msgid "Sometimes we have to change rights for an entire file tree. All the commands above have a -R option to operate recursively in sub-directories."
msgstr ""
msgid "permissionsX"
msgstr ""
msgid "The distinction between directories and files sometimes causes problems with recursive operations. That is why the “X” letter has been introduced in the symbolic representation of rights. It also represents the right to execute, but it applies differently to directories and files."
msgstr ""
msgid "For directories it adds executable permissions to the chosen user(s). For files, it adds the executable bit only if at least one of the users (owner, group, or others) already has executable permissions. Let's demonstrate it, because this bit can be confusing:"
msgstr ""
msgid ""
"$ ls test.txt\n"
" -rw-r--r-- 1 daniel daniel 0 18. Nov 01:07 test.txt\n"
" $ chmod u+X test.txt\n"
" $ ls test.txt\n"
" -rw-r--r-- 1 daniel daniel 0 18. Nov 01:07 test.txt\n"
" $ chmod o+x test.txt\n"
" $ ls test.txt\n"
" -rw-r--r-x 1 daniel daniel 0 18. Nov 01:07 test.txt\n"
" $ chmod u+X test.txt\n"
" $ ls test.txt\n"
" -rwxr--r-x 1 daniel daniel 0 18. Nov 01:07 test.txt\n"
" "
msgstr ""
msgid "The example shows a typical file with its default permissions: its owner can read and write it, the owner's group and all other users can read it. The next operation (u+X) won't add executable permissions for the owner of the file, because permissions to execute have not been assigned. The operation has no effect on the file. Next we assign execute rights for \"other\" users and repeat the operation. This time it is successful, because at least one user group already had executable permissions."
msgstr ""
msgid "It is a misconception that this bit will only affect directories. If files and directories have mixed permissions, it is often a good idea to use the find command to locate the targets you want to operate on."
msgstr ""
msgid "TIP Changing the user and group together"
msgstr ""
msgid "Frequently you want to change the group of a file at the same time that you change the owner. The chown command has a special syntax for that: chown user:group file. This syntax can also be used to recursively (-R) change the ownership of a whole directory."
msgstr ""
msgid "GOING FURTHER umask"
msgstr ""
msgid "umask"
msgstr ""
msgid "When an application creates a file, it assigns indicative permissions, knowing that the system automatically removes certain rights, given by the command umask. Enter umask in a shell; you will see a mask such as 0022. This is simply an octal representation of the rights to be systematically removed. In this case, the write right for the group and other users: With the above umask value, the default for directories 777 becomes 755 and the default permissions for files 666 become 644."
msgstr ""
msgid "rightsmask"
msgstr ""
msgid "permissionsumask"
msgstr ""
msgid "maskrights mask"
msgstr ""
msgid "The system's default value is handled by pam_umask 8 and /etc/login.defs."
msgstr ""
msgid "/etc/etc/login.defs"
msgstr ""
msgid "If you give it a new octal value, the umask command modifies the mask. Used in a shell initialization file (for example, ~/.bashrc or ~/.profile), it will effectively change the default mask for your work sessions."
msgstr ""
msgid "ACLs - Access Control Lists"
msgstr ""
msgid "ACL"
msgstr ""
msgid "Access Control ListACL"
msgstr ""
msgid "acl"
msgstr ""
msgid "Many filesystems, e.g. Btrfs, Ext3, Ext4, JFS, XFS, etc., support the use of Access Control Lists (ACLs). These extend the basic features of file ownership and permission, described in the previous section, and allow for a more fine-grained control of each (file) object. For example: A user wants to share a file with another user and that user should only be able to read the file, but not write or change it."
msgstr ""
msgid "/etc/etc/fstab"
msgstr ""
msgid "ACLacl"
msgstr ""
msgid "ACLnoacl"
msgstr ""
msgid "For some of the filesystems, the usage of ACLs is enabled by default (e.g. Btrfs, Ext3, Ext4). For other filesystems or older systems it must be enabled using the acl mount option - either in the mount command directly or in /etc/fstab. In the same way the usage of ACLs can be disabled by using the noacl mount option. For Ext* filesystems one can also use the tune2fs -o [no]acl /dev/device command to enable/disable the usage of ACLs by default. The default values for each filesystem can usually be found in their homonym manual pages in section 5 (filesystem 5) or in mount 8."
msgstr ""
msgid "After enabling ACLs, permissions can be set using the setfacl 1 command, while getfacl 1 allows one to retrieve the ACLs for a given object or path. These commands are part of the acl package. With setfacl one can also configure newly created files or directories to inherit permissions from the parent directory. It is important to note that ACLs are processed in their order and that an earlier entry that fits the situation has precedence over later entries."
msgstr ""
msgid "If a file has ACLs set, the output of the ls -l command will show a plus-sign after the traditional permissions. When using ACLs, the chmod command behaves slightly different, and umask might be ignored. The extensive documentation, e.g. acl 5 contains more information."
msgstr ""
msgid "Administration Interfaces"
msgstr ""
msgid "interfaceadministration interface"
msgstr ""
msgid "administration, interfaces"
msgstr ""
msgid "Using a graphical interface for administration is interesting in various circumstances. An administrator does not necessarily know all the configuration details for all their services, and doesn't always have the time to go seeking out the documentation on the matter. A graphical interface for administration can thus accelerate the deployment of a new service. It can also simplify the setup of services which are hard to configure."
msgstr ""
msgid "Such an interface is only an aid, and not an end in itself. In all cases, the administrator must master its behavior in order to understand and work around any potential problem."
msgstr ""
msgid "Since no interface is perfect, you may be tempted to try several solutions. This is to be avoided as much as possible, since different tools are sometimes incompatible in their work methods. Even if they all aim to be very flexible and try to adopt the configuration file as a single reference, they are not always able to integrate external changes."
msgstr ""
msgid "Administrating on a Web Interface: webmin"
msgstr ""
msgid "webmin"
msgstr ""
msgid "administration, interfaceswebmin"
msgstr ""
msgid "This is, without a doubt, one of the most successful administration interfaces. It is a modular system managed through a web browser, covering a wide array of areas and tools. Furthermore, it is internationalized and available in many languages."
msgstr ""
msgid "Webmin dashboard"
msgstr ""
msgid "Sadly, webmin is no longer part of Debian. Its Debian maintainer removed the packages created because they no longer had the time required to maintain them at an acceptable quality level. Nobody has officially taken over, so Debian does not provide the webmin package."
msgstr ""
msgid "There is, however, an unofficial package distributed on the webmin.com website. Contrary to the original Debian packages, this package is monolithic; all of its configuration modules are installed and activated by default, even if the corresponding service is not installed on the machine."
msgstr ""
msgid "SECURITY Changing the root password"
msgstr ""
msgid "On the first login, identification is conducted with the root username and its usual password (or any user's login credentials which belongs to the sudo group). It is recommended to change the password used for webmin as soon as possible, so that if it is compromised, the server's user accounts will not be involved, even if this confers important administrative rights to the machine."
msgstr ""
msgid "Beware! Since webmin has so many features, a malicious user accessing it could compromise the security of the entire system. In general, interfaces of this kind are not recommended for important systems with strong security constraints (firewall, sensitive servers, etc.), and they are not recommended to be exposed to the public either."
msgstr ""
msgid "Webmin is used through a web interface, but it does not require Apache to be installed. Essentially, this software has its own integrated mini web server. This server listens by default on port 10000 and accepts secure HTTP connections."
msgstr ""
msgid "Included modules cover a wide variety of services, among which:"
msgstr ""
msgid "all base services: creation of users and groups, management of crontab files, service scripts/files, viewing of logs, etc."
msgstr ""
msgid "bind: DNS server configuration (name service);"
msgstr ""
msgid "postfix: SMTP server configuration (e-mail);"
msgstr ""
msgid "network services: configuration of the xinetd super-server;"
msgstr ""
msgid "disk quota: user quota management;"
msgstr ""
msgid "dhcpd: DHCP server configuration;"
msgstr ""
msgid "proftpd: FTP server configuration;"
msgstr ""
msgid "samba: Samba file server configuration;"
msgstr ""
msgid "software: installation or removal of software from Debian packages and system updates."
msgstr ""
msgid "The administration interface is available in a web browser at https://localhost:10000. Beware! Not all the modules are directly usable. Sometimes they must be configured by specifying the locations of the corresponding configuration files and some executable files (program). Frequently the system will politely prompt you when it fails to activate a requested module."
msgstr ""
msgid "ALTERNATIVE GNOME control center"
msgstr ""
msgid "gnome-control-center"
msgstr ""
msgid "The GNOME project also provides multiple administration interfaces that are usually accessible via the “Settings” entry in the user menu on the top right. gnome-control-center is the main program that brings them all together but many of the system wide configuration tools are effectively provided by other packages (accountsservice, system-config-printer, etc.). Although they are easy to use, these applications cover only a limited number of base services: user management, time configuration, network configuration, printer configuration, and so on."
msgstr ""
msgid "Configuring Packages: debconf"
msgstr ""
msgid "debconfdpkg-reconfigure"
msgstr ""
msgid "dpkg-reconfiguredebconf"
msgstr ""
msgid "Many packages are automatically configured after asking a few questions during installation through the Debconf tool. These packages can be reconfigured by running dpkg-reconfigure -plevel package."
msgstr ""
msgid "For most cases, these settings are very simple; only a few important variables in the configuration file are changed. These variables are often grouped between two “demarcation” lines so that reconfiguration of the package only impacts the enclosed area. In other cases, reconfiguration will not change anything if the script detects a manual modification of the configuration file, in order to preserve these human interventions (because the script can't ensure that its own modifications will not disrupt the existing settings)."
msgstr ""
msgid "DEBIAN POLICY Preserving changes"
msgstr ""
msgid "Debian Projectpolicy"
msgstr ""
msgid "configurationfiles"
msgstr ""
msgid "The Debian Policy expressly stipulates that everything should be done to preserve manual changes made to a configuration file, so more and more scripts take precautions when editing configuration files. The general principle is simple: the script will only make changes if it knows the status of the configuration file, which is verified by comparing the checksum of the file against that of the last automatically generated file. If they are the same, the script is authorized to change the configuration file. Otherwise, it determines that the file has been changed and asks what action it should take (install the new file, save the old file, or try to integrate the new changes with the existing file). This precautionary principle has long been unique to Debian, but other distributions have gradually begun to embrace it."
msgstr ""
msgid "ucf"
msgstr ""
msgid "The ucf program (from the Debian package of the same name) can be used to implement such a behavior."
msgstr ""
msgid "syslog System Events"
msgstr ""
msgid "rsyslogd"
msgstr ""
msgid "filelog file"
msgstr ""
msgid "log filesdispatching"
msgstr ""
msgid "log files/var/log"
msgstr ""
msgid "Principle and Mechanism"
msgstr ""
msgid "The rsyslogd daemon is responsible for collecting service messages coming from applications and the kernel, then dispatching them into log files (usually stored in the /var/log/ directory). It obeys the /etc/rsyslog.conf configuration file."
msgstr ""
msgid "/etc/etc/rsyslog.confrsyslogd"
msgstr ""
msgid "Each log message is associated with an application subsystem (called “facility” in the documentation):"
msgstr ""
msgid "rsyslogdfacility"
msgstr ""
msgid "auth and authpriv: for authentication;"
msgstr ""
msgid "cron: comes from task scheduling services, cron and atd;"
msgstr ""
msgid "daemon: affects a daemon without any special classification (DNS, NTP, etc.);"
msgstr ""
msgid "ftp: concerns the FTP server;"
msgstr ""
msgid "kern: message coming from the kernel;"
msgstr ""
msgid "lpr: comes from the printing subsystem;"
msgstr ""
msgid "mail: comes from the e-mail subsystem;"
msgstr ""
msgid "news: Usenet subsystem message (especially from an NNTP — Network News Transfer Protocol — server that manages newsgroups);"
msgstr ""
msgid "Network News Transfer ProtocolNNTP"
msgstr ""
msgid "syslog: messages from the syslogd server, itself;"
msgstr ""
msgid "user: user messages (generic);"
msgstr ""
msgid "uucp: messages from the UUCP server (Unix to Unix Copy Program, an old protocol notably used to distribute e-mail messages);"
msgstr ""
msgid "local0 to local7: reserved for local use."
msgstr ""
msgid "Each message is also associated with a priority level. Here is the list in decreasing order:"
msgstr ""
msgid "rsyslogdpriority"
msgstr ""
msgid "emerg: “Help!” There is an emergency, the system is probably unusable."
msgstr ""
msgid "alert: hurry up, any delay can be dangerous, action must be taken immediately;"
msgstr ""
msgid "crit: conditions are critical;"
msgstr ""
msgid "err: error;"
msgstr ""
msgid "warn: warning (potential error);"
msgstr ""
msgid "notice: conditions are normal, but the message is important;"
msgstr ""
msgid "info: informative message;"
msgstr ""
msgid "debug: debugging message."
msgstr ""
msgid "The Configuration File"
msgstr ""
msgid "rsyslogdconfiguration/etc/rsyslog.conf"
msgstr ""
msgid "The syntax of the /etc/rsyslog.conf file is detailed in the rsyslog.conf 5 manual page, but there is also HTML documentation available in the rsyslog-doc package (/usr/share/doc/rsyslog-doc/html/index.html). The overall principle is to write “selector” and “action” pairs. The selector defines all relevant messages, and the action describes how to deal with them."
msgstr ""
msgid "Syntax of the Selector"
msgstr ""
msgid "rsyslogdselector"
msgstr ""
msgid "The selector is a semicolon-separated list of subsystem.priority pairs (example: auth.notice;mail.info). An asterisk may represent all subsystems or all priorities (examples: *.alert or mail.*). Several subsystems can be grouped, by separating them with a comma (example: auth,mail.info). The priority indicated also covers messages of equal or higher priority; thus auth.alert indicates the auth subsystem messages of alert or emerg priority. Prefixed with an exclamation point (!), it indicates the opposite, in other words the strictly lower priorities; auth.!notice, thus, indicates messages issued from auth, with info or debug priority. Prefixed with an equal sign (=), it corresponds to precisely and only the priority indicated (auth.=notice only concerns messages from auth with notice priority)."
msgstr ""
msgid "Each element in the list on the selector overrides previous elements. It is thus possible to restrict a set or to exclude certain elements from it. For example, kern.info;kern.!err means messages from the kernel with priority between info and warn. The none priority indicates the empty set (no priorities), and may serve to exclude a subsystem from a set of messages. Thus, *.crit;kern.none indicates all the messages of priority equal to or higher than crit not coming from the kernel."
msgstr ""
msgid "Syntax of Actions"
msgstr ""
msgid "rsyslogdaction"
msgstr ""
msgid "BACK TO BASICS The named pipe, a persistent pipe"
msgstr ""
msgid "named pipe"
msgstr ""
msgid "pipenamed pipe"
msgstr ""
msgid "mkfifo"
msgstr ""
msgid "A named pipe is a particular type of file that operates like a traditional pipe (the pipe that you make with the “|” symbol on the command line), but via a file. This mechanism has the advantage of being able to relate two unrelated processes. Anything written to a named pipe blocks the process that writes until another process attempts to read the data written. This second process reads the data written by the first, which can then resume execution."
msgstr ""
msgid "Such a file is created with the mkfifo command."
msgstr ""
msgid "The various possible actions are:"
msgstr ""
msgid "add the message to a file (example: /var/log/messages);"
msgstr ""
msgid "send the message to a remote syslog server (example: @log.falcot.com);"
msgstr ""
msgid "send the message to an existing named pipe (example: |/dev/xconsole);"
msgstr ""
msgid "send the message to one or more users, if they are logged in (example: root,rhertzog);"
msgstr ""
msgid "send the message to all logged in users (example: *);"
msgstr ""
msgid "write the message in a text console (example: /dev/tty8)."
msgstr ""
msgid "SECURITY Forwarding logs"
msgstr ""
msgid "logforwarding"
msgstr ""
msgid "rsyslogdserver"
msgstr ""
msgid "It is a good idea to record the most important logs on a separate machine (perhaps dedicated for this purpose), since this will prevent any possible intruder from removing traces of their intrusion (unless, of course, they also compromise this other server). Furthermore, in the event of a major problem (such as a kernel crash), you have the logs available on another machine, which increases your chances of determining the sequence of events that caused the crash."
msgstr ""
msgid "To accept log messages sent by other machines, you must reconfigure rsyslog: in practice, it is sufficient to activate the ready-for-use entries in /etc/rsyslog.conf ($ModLoad imudp and $UDPServerRun 514)."
msgstr ""
msgid "The inetd Super-Server"
msgstr ""
msgid "Inetd (often called “Internet super-server”) is a server of servers. It executes rarely used servers on demand, so that they do not have to run continuously."
msgstr ""
msgid "inetdsuper-server"
msgstr ""
msgid "super-server"
msgstr ""
msgid "The /etc/inetd.conf file lists these servers and their usual ports. The inetd command listens to all of them; when it detects a connection to any such port, it executes the corresponding server program."
msgstr ""
msgid "DEBIAN POLICY Register a server in /etc/inetd.conf"
msgstr ""
msgid "/etc/etc/inetd.confinetd"
msgstr ""
msgid "update-inetdsuper-server"
msgstr ""
msgid "super-serverregister new serverupdate-inetd"
msgstr ""
msgid "Packages frequently want to register a new server in the /etc/inetd.conf file, but Debian Policy prohibits any package from modifying a configuration file that it doesn't own. This is why the update-inetd script (in the package with the same name) was created: It manages the configuration file, and other packages can thus use it to register a new server to the super-server's configuration."
msgstr ""
msgid "Each significant line of the /etc/inetd.conf file describes a server through seven fields (separated by spaces):"
msgstr ""
msgid "super-serverconfiguration"
msgstr ""
msgid "The TCP or UDP port number, or the service name (which is mapped to a standard port number with the information contained in the /etc/services file)."
msgstr ""
msgid "/etc/etc/services"
msgstr ""
msgid "The socket type: stream for a TCP connection, dgram for UDP datagrams."
msgstr ""
msgid "The protocol: tcp, tcp6, udp, or udp6."
msgstr ""
msgid "The options: two possible values: wait or nowait, to tell inetd whether it should wait or not for the end of the launched process before accepting another connection. For TCP connections, easily multiplexable, you can usually use nowait. For programs responding over UDP, you should use nowait only if the server is capable of managing several connections in parallel. You can suffix this field with a period, followed by the maximum number of connections authorized per minute (the default limit is 256)."
msgstr ""
msgid "The user name of the user under whose identity the server will run. Optionally one can add the group too via user.group syntax."
msgstr ""
msgid "The full path to the server program to execute."
msgstr ""
msgid "The arguments: this is a complete list of the program's arguments, including its own name (argv[0] in C)."
msgstr ""
msgid "The following example illustrates some use-cases after installing talkd, nullidentd (ident-server), and fingerd:"
msgstr ""
msgid "Excerpt from /etc/inetd.conf"
msgstr ""
msgid ""
"#:BSD: Shell, login, exec and talk are BSD protocols.\n"
"talk dgram udp wait nobody.tty /usr/sbin/in.talkd in.talkd\n"
"ntalk dgram udp wait nobody.tty /usr/sbin/in.ntalkd in.ntalkd\n"
"\n"
"#:INFO: Info services\n"
"ident stream tcp nowait nobody /usr/sbin/nullidentd nullidentd\n"
"finger stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/in.fingerd"
msgstr ""
msgid "tcpd"
msgstr ""
msgid "super-serveraccess limitation"
msgstr ""
msgid "The tcpd program is frequently used in the /etc/inetd.conf file. It allows limiting incoming connections by applying access control rules, documented in the hosts_access 5 manual page, and which are configured in the /etc/hosts.allow and /etc/hosts.deny files. Once it has been determined that the connection is authorized, tcpd executes the real server (like in.fingerd in our example). It is worth noting that tcpd relies on the name under which it was invoked (that is the first argument, argv[0]) to identify the real program to run. So you should not start the arguments list with tcpd but with the program that must be wrapped."
msgstr ""
msgid "/etc/etc/hosts.allow"
msgstr ""
msgid "/etc/etc/hosts.deny"
msgstr ""
msgid "COMMUNITY Wietse Venema"
msgstr ""
msgid "Wietse Venema"
msgstr ""
msgid "Venema, Wietse"
msgstr ""
msgid "Wietse Venema, whose expertise in security has made him a renowned programmer, is the author of the tcpd program. He is also the main creator of Postfix, the modular e-mail server (SMTP, Simple Mail Transfer Protocol), designed to be safer and more reliable than sendmail, which features a long history of security vulnerabilities. We will have a closer look at this mail server in ."
msgstr ""
msgid "ALTERNATIVE Other inetd commands"
msgstr ""
msgid "inet-superserversuper-user"
msgstr ""
msgid "xinetdsuper-user"
msgstr ""
msgid "While Debian installs openbsd-inetd by default, there is no lack of alternatives: we can mention inetutils-inetd, rlinetd, and xinetd, which all provide the virtual package inet-superserver."
msgstr ""
msgid "/etc/etc/xinetd.d/xinetd"
msgstr ""
msgid "Most of these alternatives share the same configuration file /etc/inetd.conf."
msgstr ""
msgid "This last incarnation of a super-server however, offers different syntax and very interesting possibilities. Most notably, its configuration can be split into several files (stored, of course, in the /etc/xinetd.d/ directory), which can make an administrator's life easier. It is considered to be more powerful, but also more complex."
msgstr ""
msgid "Last but not least, it is even possible to emulate inetd's behavior with systemd's socket-activation mechanism (see )."
msgstr ""
msgid "Scheduling Tasks with cron and atd"
msgstr ""
msgid "cron"
msgstr ""
msgid "atd"
msgstr ""
msgid "scheduled commands"
msgstr ""
msgid "command scheduling"
msgstr ""
msgid "cron is the daemon responsible for executing scheduled and recurring commands (every hour, every day, every week, etc.). atd deals with commands to be executed a single time, but at a specific moment in the future."
msgstr ""
msgid "In a Unix system, many tasks are scheduled for regular execution:"
msgstr ""
msgid "rotating the logs;"
msgstr ""
msgid "updating the database for the locate program;"
msgstr ""
msgid "back-ups;"
msgstr ""
msgid "maintenance scripts (such as cleaning out temporary files)."
msgstr ""
msgid "crontab"
msgstr ""
msgid "By default, all users can schedule the execution of tasks. Each user has thus their own crontab in which they can record scheduled commands. It can be edited by running crontab -e (its content is stored in the /var/spool/cron/crontabs/user file)."
msgstr ""
msgid "SECURITY Restricting cron or atd"
msgstr ""
msgid "/etc/etc/at.allowatd"
msgstr ""
msgid "/etc/etc/at.denyatd"
msgstr ""
msgid "/etc/etc/cron.allowcron"
msgstr ""
msgid "/etc/etc/cron.denycron"
msgstr ""
msgid "You can restrict access to crontab by creating an explicit authorization file (whitelist) in /etc/cron.allow, in which you indicate the only users authorized to schedule commands. All others will automatically be deprived of this feature. Conversely, to only block one or two troublemakers, you could write their username in the explicit prohibition file (blacklist), /etc/cron.deny. This same feature is available for atd, with the /etc/at.allow and /etc/at.deny files (also described in their manual pages)."
msgstr ""
msgid "/etc/etc/crontab"
msgstr ""
msgid "/etc/etc/cron.d/"
msgstr ""
msgid "The root user has their own crontab, but can also use the /etc/crontab file, or write additional crontab files in the /etc/cron.d directory. These last two solutions have the advantage of being able to specify the user identity to use when executing the command."
msgstr ""
msgid "The cron package includes by default some scheduled commands that execute:"
msgstr ""
msgid "/etc/etc/cron.hourly/"
msgstr ""
msgid "programs in the /etc/cron.hourly/ directory once per hour;"
msgstr ""
msgid "/etc/etc/cron.daily/"
msgstr ""
msgid "programs in /etc/cron.daily/ once per day;"
msgstr ""
msgid "/etc/etc/cron.weekly/"
msgstr ""
msgid "programs in /etc/cron.weekly/ once per week;"
msgstr ""
msgid "/etc/etc/cron.monthly/"
msgstr ""
msgid "programs in /etc/cron.monthly/ once per month."
msgstr ""
msgid "Many Debian packages rely on this service: by putting maintenance scripts in these directories, they ensure optimal operation of their services."
msgstr ""
msgid "Format of a crontab File"
msgstr ""
msgid "crontabcrontab file format"
msgstr ""
msgid "TIP Text shortcuts for cron"
msgstr ""
msgid "cron recognizes some abbreviations which replace the first five fields in a crontab entry. They correspond to the most classic scheduling options:"
msgstr ""
msgid "@yearly: once per year (January 1, at 00:00);"
msgstr ""
msgid "@monthly: once per month (the 1st of the month, at 00:00);"
msgstr ""
msgid "@weekly: once per week (Sunday at 00:00);"
msgstr ""
msgid "@daily: once per day (at 00:00);"
msgstr ""
msgid "@hourly: once per hour (at the beginning of each hour)."
msgstr ""
msgid "More abbreviations are recognized, like @rebootor @midnight."
msgstr ""
msgid "SPECIAL CASE cron and daylight savings time"
msgstr ""
msgid "In Debian, cron takes the time change (for Daylight Savings Time, or in fact for any significant change in the local time) into account as best as it can. Thus, the commands that should have been executed during an hour that never existed (for example, tasks scheduled at 2:30 am during the Spring time change in France, since at 2:00 am the clock jumps directly to 3:00 am) are executed shortly after the time change (thus around 3:00 am DST). On the other hand, in autumn, when commands would be executed several times (2:30 am DST, then an hour later at 2:30 am standard time, since at 3:00 am DST the clock turns back to 2:00 am) are only executed once."
msgstr ""
msgid "Be careful, however, if the order in which the different scheduled tasks and the delay between their respective executions matters, you should check the compatibility of these constraints with cron's behavior; if necessary, you can prepare a special schedule for the two problematic nights per year."
msgstr ""
msgid "Each significant line of a crontab entry describes a scheduled command with the six (or seven) following fields:"
msgstr ""
msgid "the value for the minute (from 0 to 59);"
msgstr ""
msgid "the value for the hour (from 0 to 23);"
msgstr ""
msgid "the value for the day of the month (from 1 to 31);"
msgstr ""
msgid "the value for the month (from 1 to 12);"
msgstr ""
msgid "the value for the day of the week (from 0 to 7, 1 corresponding to Monday, Sunday being represented by both 0 and 7; it is also possible to use the first three letters of the name of the day of the week in English, such as Sun, Mon, etc.);"
msgstr ""
msgid "the user name under whose identity the command must be executed (in the /etc/crontab file and in the fragments located in /etc/cron.d/, but not in the users' own crontab files);"
msgstr ""
msgid "the command to execute (when the conditions defined by the first five columns are met)."
msgstr ""
msgid "All these details are documented in the crontab 5 man page."
msgstr ""
msgid "Each value can also be expressed in the form of a list of possible values (separated by commas). The syntax a-b describes the interval of all the values between a and b. The syntax a-b/c describes the interval with an increment of c (example: 0-10/2 means 0,2,4,6,8,10). An asterisk * is a wildcard, representing all possible values."
msgstr ""
msgid "Sample user crontab file"
msgstr ""
msgid ""
"#Format\n"
"#min hour day mon dow command\n"
"\n"
"# Download data every night at 7:25 pm\n"
" 25 19 * * * $HOME/bin/get.pl\n"
"\n"
"# 8:00 am, on weekdays (Monday through Friday)\n"
" 00 08 * * 1-5 $HOME/bin/dosomething\n"
"\n"
"# every two hours\n"
" * */2 * * * $HOME/bin/dosomethingelse\n"
"\n"
"# Restart the IRC proxy after each reboot\n"
"@reboot /usr/bin/dircproxy"
msgstr ""
msgid "TIP Executing a command on boot"
msgstr ""
msgid "cron@reboot"
msgstr ""
msgid "To execute a command a single time, just after booting the computer, you can use the @reboot macro (a simple restart of cron does not trigger a command scheduled with @reboot). This macro replaces the first five fields of an entry in the crontab."
msgstr ""
msgid "ALTERNATIVE Emulating cron with systemd"
msgstr ""
msgid "It is possible to emulate part of cron's behavior with systemd's timer mechanism (see )."
msgstr ""
msgid "Using the at Command"
msgstr ""
msgid "at"
msgstr ""
msgid "The at executes a command at a specified moment in the future. It takes the desired time and date as command-line parameters, and the command to be executed in its standard input. The command will be executed as if it had been entered in the current shell. at even takes care to retain the current environment, in order to reproduce the same conditions when it executes the command. The time is indicated by following the usual conventions: 16:12 or 4:12pm represents 4:12 pm. The date can be specified in several European and Western formats, including DD.MM.YY (27.07.22 thus representing 27 July 2022), YYYY-MM-DD (this same date being expressed as 2022-07-27), MM/DD/[CC]YY (i.e., 12/25/22 or 12/25/2022 will be December 25, 2022), or simple MMDD[CC]YY (so that 122522 or 12252022 will, likewise, represent December 25, 2022). Without it, the command will be executed as soon as the clock reaches the time indicated (the same day, or tomorrow if that time has already passed on the same day). You can also simply write “today” or “tomorrow”, which is self-explanatory."
msgstr ""
msgid ""
"\n"
"$ at 09:00 27.07.22 <<END\n"
"> echo \"Don't forget to wish a Happy Birthday to Raphaël!\" \\\n"
"> | mail lolando@debian.org\n"
"> END\n"
"warning: commands will be executed using /bin/sh\n"
"job 1 at Wed Jul 27 09:00:00 2022"
msgstr ""
msgid "An alternative syntax postpones the execution for a given duration: at now + number period. The period can be minutes, hours, days, or weeks. The number simply indicates the number of said units that must elapse before execution of the command."
msgstr ""
msgid "To cancel a task scheduled by cron, simply run crontab -e and delete the corresponding line in the crontab file. For at tasks, it is almost as easy: run atrm task-number. The task number is indicated by the at command when you scheduled it, but you can find it again with the atq command, which gives the current list of scheduled tasks."
msgstr ""
msgid "atrm"
msgstr ""
msgid "atq"
msgstr ""
msgid "Scheduling Asynchronous Tasks: anacron"
msgstr ""
msgid "anacroncron"
msgstr ""
msgid "/etc/etc/anacrontab"
msgstr ""
msgid "anacron is the daemon that completes cron for computers that are not on at all times. Since regular tasks are usually scheduled for the middle of the night, they will never be executed if the computer is off at that time. The purpose of anacron is to execute them, taking into account periods in which the computer is not working."
msgstr ""
msgid "nice"
msgstr ""
msgid "Please note that anacron will frequently execute such activity a few minutes after booting the machine, which can render the computer less responsive. This is why the tasks in the /etc/anacrontab file are started with the nice command, which reduces their execution priority and thus limits their impact on the rest of the system. Beware, the format of this file is not the same as that of /etc/crontab; if you have particular needs for anacron, see the anacrontab 5 manual page."
msgstr ""
msgid "BACK TO BASICS Priorities and nice"
msgstr ""
msgid "renice"
msgstr ""
msgid "nicenessnice"
msgstr ""
msgid "Unix systems (and thus Linux) are multi-tasking and multi-user systems. Indeed, several processes can run in parallel, and be owned by different users: the kernel mediates access to the resources between the different processes. As a part of this task, it has a concept of priority, which allows it to favor certain processes over others, as needed. When you know that a process can run in low priority, you can indicate so by running it with nice program. The program will then have a smaller share of the CPU, and will have a smaller impact on other running processes. Of course, if no other process needs to run, the program will not be artificially held back."
msgstr ""
msgid "nice works with levels of “niceness”: the positive levels (from 1 to 19) progressively lower the priority, while the negative levels (from -1 to -20) will increase it — but only root can use these negative levels. Unless otherwise indicated (see the nice 1 manual page), nice increases the current level by 10."
msgstr ""
msgid "If you discover that an already running task should have been started with nice it is not too late to fix it; the renice command changes the priority of an already running process, in either direction (but reducing the “niceness” of a process is reserved for the root user)."
msgstr ""
msgid "Installation of the anacron package deactivates execution by cron of the scripts in the /etc/cron.hourly/, /etc/cron.daily/, /etc/cron.weekly/, and /etc/cron.monthly/ directories. This avoids their double execution by anacron and cron. The cron command remains active and will continue to handle the other scheduled tasks (especially those scheduled by users)."
msgstr ""
msgid "Quotas"
msgstr ""
msgid "quota"
msgstr ""
msgid "The quota system allows limiting disk space allocated to a user or group of users. To set it up, you must have a kernel that supports it (compiled with the CONFIG_QUOTA option) — as is the case with Debian kernels. The quota management software is found in the quota Debian package."
msgstr ""
msgid "usrquotaquota"
msgstr ""
msgid "grpquotaquota"
msgstr ""
msgid "To activate quota in a filesystem, you have to indicate the usrquota and grpquota options in /etc/fstab for the user and group quotas, respectively. Rebooting the computer will then update the quotas in the absence of disk activity (a necessary condition for proper accounting of already used disk space)."
msgstr ""
msgid "edquota"
msgstr ""
msgid "quotaedquota"
msgstr ""
msgid "The edquota user (or edquota -g group) command allows you to change the limits while examining current disk space usage."
msgstr ""
msgid "GOING FURTHER Defining quotas with a script"
msgstr ""
msgid "setquota"
msgstr ""
msgid "quotasetquota"
msgstr ""
msgid "The setquota program can be used in a script to automatically change many quotas. Its setquota 8 manual page details the syntax to use."
msgstr ""
msgid "The quota system allows you to set four limits:"
msgstr ""
msgid "two limits (called “soft” and “hard”) refer to the number of blocks consumed. If the filesystem was created with a block-size of 1 kibibyte, the 1024 available bytes of each block can only be assigned to one file. Unsaturated blocks thus induce losses of disk space. A quota of 100 blocks, which theoretically allows storage of 102,400 bytes, will, however, be saturated with just 100 files of 500 bytes each, only representing 50,000 bytes in total."
msgstr ""
msgid "two limits (“soft” and “hard”) refer to the number of inodes used. Each file occupies at least one inode to store information about it (permissions, owner, timestamp of last access, etc.). It is thus a limit on the number of user files."
msgstr ""
msgid "inode"
msgstr ""
msgid "quotasoft limit"
msgstr ""
msgid "quotahard limit"
msgstr ""
msgid "A “soft” limit can be temporarily exceeded; the user will simply be warned that they are exceeding the quota by the warnquota command, which is usually invoked by cron. A “hard” limit can never be exceeded: the system will refuse any operation that will cause a hard quota to be exceeded."
msgstr ""
msgid "quotawarnquota"
msgstr ""
msgid "VOCABULARY Blocks and inodes"
msgstr ""
msgid "block (disk)"
msgstr ""
msgid "The filesystem divides the hard drive into blocks — small contiguous areas. The size of these blocks is defined during creation of the filesystem, and generally varies between 1 and 8 kibibytes."
msgstr ""
msgid "A block can be used either to store the real data of a file, or for meta-data used by the filesystem. Among this meta-data, you will especially find the inodes. An inode uses a block on the hard drive (but this block is not taken into consideration in the block quota, only in the inode quota), and contains both the information on the file to which it corresponds (name, owner, permissions, etc.) and the pointers to the data blocks that are actually used. For very large files that occupy more blocks than it is possible to reference in a single inode, there is an indirect block system; the inode references a list of blocks that do not directly contain data, but another list of blocks."
msgstr ""
msgid "With the edquota -t command, you can define a maximum authorized “grace period” within which a soft limit may be exceeded. After this period, the soft limit will be treated like a hard limit, and the user will have to reduce their disk space usage to within this limit in order to be able to write anything to the hard drive."
msgstr ""
msgid "GOING FURTHER Setting up a default quota for new users"
msgstr ""
msgid "quotaQUOTAUSER"
msgstr ""
msgid "environment variableQUOTAUSER"
msgstr ""
msgid "/etc/etc/adduser.conf"
msgstr ""
msgid "quotatemplate user"
msgstr ""
msgid "To automatically setup a quota for new users, you have to configure a template user (with edquota or setquota) and indicate their user name in the QUOTAUSER variable in the /etc/adduser.conf file. This quota configuration will then be automatically applied to each new user created with the adduser command."
msgstr ""
msgid "backup"
msgstr ""
msgid "restoration"
msgstr ""
msgid "Making backups is one of the main responsibilities of any administrator, but it is a complex subject, involving powerful tools which are often difficult to master."
msgstr ""
msgid "amanda"
msgstr ""
msgid "bacula"
msgstr ""
msgid "dd"
msgstr ""
msgid "duplicity"
msgstr ""
msgid "fsarchiver"
msgstr ""
msgid "BackupPC"
msgstr ""
msgid "rdiff-backup"
msgstr ""
msgid "rsnapshot"
msgstr ""
msgid "timeshift"
msgstr ""
msgid "Many programs exist, such as amanda, bacula, or BackupPC. Those are client/server systems featuring many options, whose configuration is rather difficult. Some of them provide user-friendly web interfaces to mitigate this. For non-enterprise systems, administrators might want to check out rsnapshot or rdiff-backup. Users can easily create backups of their filesystems with timeshift, fsarchiver, duplicity, or even dd."
msgstr ""
msgid "Debian contains dozens of other backup software covering all possible use cases, as you can easily confirm with apt-cache search backup."
msgstr ""
msgid "Rather than detailing some of them, this section will present the thoughts of the Falcot Corp administrators when they defined their backup strategy."
msgstr ""
msgid "At Falcot Corp, backups have two goals: recovering erroneously deleted files, and quickly restoring any computer (server or desktop) whose hard drive has failed."
msgstr ""
msgid "Backing Up with rsync"
msgstr ""
msgid "rsync"
msgstr ""
msgid "Backups on tape having been deemed too slow and costly, data will be backed up on hard drives on a dedicated server, on which the use of software RAID (see ) will protect the data from hard drive failure. Desktop computers are not backed up individually, but users are advised that their personal account on their department's file server will be backed up. The rsync command (from the package of the same name) is used daily to back up these different servers."
msgstr ""
msgid "BACK TO BASICS The hard link, a second name for the file"
msgstr ""
msgid "linkhard link"
msgstr ""
msgid "hard link"
msgstr ""
msgid "ln"
msgstr ""
msgid "A hard link, as opposed to a symbolic link, cannot be differentiated from the linked file. Creating a hard link is essentially the same as giving an existing file a second name. This is why the deletion of a hard link only removes one of the names associated with the file. As long as another name is still assigned to the file, the data therein remain present on the filesystem. It is interesting to note that, unlike a copy, the hard link does not take up additional space on the hard drive."
msgstr ""
msgid "A hard link is created with the ln target link command. The link file is then a new name for the target file. Hard links can only be created on the same filesystem, while symbolic links are not subject to this limitation."
msgstr ""
msgid "The available hard drive space prohibits implementation of a complete daily backup. As such, the rsync command is preceded by a duplication of the content of the previous backup with hard links, which prevents usage of too much hard drive space. The rsync process then only replaces files that have been modified since the last backup. With this mechanism a great number of backups can be kept in a small amount of space. Since all backups are immediately available and accessible (for example, in different directories of a given share on the network), you can quickly make comparisons between two given dates."
msgstr ""
msgid "copy, backup copy"
msgstr ""
msgid "backupcopy"
msgstr ""
msgid "dirvish"
msgstr ""
msgid "This backup mechanism is easily implemented with the dirvish program. It uses a backup storage space (“bank” in its vocabulary) in which it places timestamped copies of sets of backup files (these sets are called “vaults” in the dirvish documentation)."
msgstr ""
msgid "/etc/etc/dirvish/master.conf"
msgstr ""
msgid "The main configuration is in the /etc/dirvish/master.conf file. It defines the location of the backup storage space, the list of “vaults” to manage, and default values for expiration of the backups. The rest of the configuration is located in the bank/vault/dirvish/default.conf files and contains the specific configuration for the corresponding set of files."
msgstr ""
msgid "The /etc/dirvish/master.conf file"
msgstr ""
msgid ""
"bank:\n"
" /backup\n"
"exclude:\n"
" lost+found/\n"
" core\n"
" *~\n"
"Runall:\n"
" root 22:00\n"
"expire-default: +15 days\n"
"expire-rule:\n"
"# MIN HR DOM MON DOW STRFTIME_FMT\n"
" * * * * 1 +3 months\n"
" * * 1-7 * 1 +1 year\n"
" * * 1-7 1,4,7,10 1"
msgstr ""
msgid "The bank setting indicates the directory in which the backups are stored. The exclude setting allows you to indicate files (or file types) to exclude from the backup. The Runall is a list of file sets to backup with a time-stamp for each set, which allows you to assign the correct date to the copy, in case the backup is not triggered at precisely the assigned time. You have to indicate a time just before the actual execution time (according to /etc/cron.d/dirvish). Finally, the expire-default and expire-rule settings define the expiration policy for backups. The above example keeps forever backups that are generated on the first Sunday of each quarter, deletes after one year those from the first Sunday of each month, and after 3 months those from other Sundays. Other daily backups are kept for 15 days. The order of the rules does matter, Dirvish uses the last matching rule, or the expire-default one if no other expire-rule matches."
msgstr ""
msgid "IN PRACTICE Scheduled expiration"
msgstr ""
msgid "The expiration rules are not used by dirvish-expire to do its job. In reality, the expiration rules are applied when creating a new backup copy to define the expiration date associated with that copy. dirvish-expire simply peruses the stored copies and deletes those for which the expiration date has passed."
msgstr ""
msgid "The /backup/root/dirvish/default.conf file"
msgstr ""
msgid ""
"client: rivendell.falcot.com\n"
"tree: /\n"
"xdev: 1\n"
"index: gzip\n"
"image-default: %Y%m%d\n"
"exclude:\n"
" /var/cache/apt/archives/*.deb\n"
" /var/cache/man/**\n"
" /tmp/**\n"
" /var/tmp/**\n"
" *.bak"
msgstr ""
msgid "The above example specifies the set of files to back up: these are files on the machine rivendell.falcot.com (for local data backup, simply specify the name of the local machine as indicated by hostname), especially those in the root tree (tree: /), except those listed in exclude. The backup will be limited to the contents of one filesystem (xdev: 1). It will not include files from other mount points. An index of saved files will be generated (index: gzip), and the image will be named according to the current date (image-default: %Y%m%d)."
msgstr ""
msgid "There are many options available, all documented in the dirvish.conf 5 manual page. Once these configuration files are setup, you have to initialize each file set with the dirvish --vault vault --init command. From there on the daily invocation of dirvish-runall will automatically create a new backup copy just after having deleted those that expired."
msgstr ""
msgid "IN PRACTICE Remote backup over SSH"
msgstr ""
msgid "When dirvish needs to save data to a remote machine, it will use ssh to connect to it, and will start rsync as a server. This requires the root user to be able to automatically connect to it. The use of an SSH authentication key allows precisely that (see )."
msgstr ""
msgid "Restoring Machines without Backups"
msgstr ""
msgid "Desktop computers, which are not backed up, will be easy to reinstall from custom DVD-ROMs/USB sticks prepared with simple-cdd (see ). Since this performs an installation from scratch, it loses any customization that can have been made after the initial installation. This is fine since the systems are all hooked to a central LDAP directory for accounts and most desktop applications are preconfigured thanks to dconf (see for more information about this)."
msgstr ""
msgid "The Falcot Corp administrators are aware of the limits in their backup policy. Since they can't protect the backup server as well as a tape in a fireproof safe, they have installed it in a separate room so that a disaster such as a fire in the server room won't destroy backups along with everything else. Furthermore, they do an incremental backup on DVD-ROM once per week — only files that have been modified since the last backup are included."
msgstr ""
msgid "GOING FURTHER Backing up SQL and LDAP services"
msgstr ""
msgid "xdelta"
msgstr ""
msgid "diff"
msgstr ""
msgid "dump"
msgstr ""
msgid "Many services (such as SQL or LDAP databases) cannot be backed up by simply copying their files (unless they are properly interrupted during creation of the backups, which is frequently problematic, since they are intended to be available at all times). As such, it is necessary to use an “export” mechanism to create a “data dump” that can be safely backed up. These are often quite large, but they compress well. To reduce the storage space required, you will only store a complete text file per week, and a diff each day, which is created with a command of the type diff file_from_yesterday file_from_today. The xdelta program produces incremental differences from binary dumps."
msgstr ""
msgid "CULTURE TAR, the standard for tape backups"
msgstr ""
msgid "backupon tape"
msgstr ""
msgid "tape, backup"
msgstr ""
msgid "TARtape archive"
msgstr ""
msgid "tape archive"
msgstr ""
msgid "Historically, the simplest means of making a backup on Unix was to store a TAR archive on a tape. The tar command even got its name from “Tape ARchive”."
msgstr ""
msgid "Hot Plugging: hotplug"
msgstr ""
msgid "Introduction"
msgstr ""
msgid "hotplug"
msgstr ""
msgid "kernelhotplug subsystem"
msgstr ""
msgid "udevd"
msgstr ""
msgid "/dev"
msgstr ""
msgid "device/dev"
msgstr ""
msgid "USB"
msgstr ""
msgid "IEEE 1394"
msgstr ""
msgid "PCMCIA"
msgstr ""
msgid "SATA"
msgstr ""
msgid "The hotplug kernel subsystem dynamically handles the addition and removal of devices, by loading the appropriate drivers and by creating the corresponding device files (with the help of udevd). With modern hardware and virtualization, almost everything can be “hotplugged“: from the usual USB/PCMCIA/IEEE 1394 peripherals to SATA hard drives, but also the CPU and the memory."
msgstr ""
msgid "The kernel has a database that associates each device ID with the required driver. This database is used during boot to load all the drivers for the peripheral devices detected on the different buses, but also when an additional hotplug device is connected. Once the device is ready for use, a message is sent to udevd so it will be able to create the corresponding entry in /dev/."
msgstr ""
msgid "The Naming Problem"
msgstr ""
msgid "Before the appearance of hotplug connections, it was easy to assign a fixed name to a device. It was based simply on the position of the devices on their respective bus. But this is not possible when such devices can come and go on the bus. The typical case is the use of a digital camera and a USB key, both of which appear to the computer as disk drives. The first one connected may be /dev/sdb and the second /dev/sdc (with /dev/sda representing the computer's own hard drive). The device name is not fixed; it depends on the order in which devices are connected."
msgstr ""
msgid "Additionally, more and more drivers use dynamic values for devices' major/minor numbers, which makes it impossible to have static entries for the given devices, since these essential characteristics may vary after a reboot."
msgstr ""
msgid "udev"
msgstr ""
msgid "udev was created precisely to solve this problem."
msgstr ""
msgid "How udev Works"
msgstr ""
msgid "/sys"
msgstr ""
msgid "/etc/etc/udev/rules.d/"
msgstr ""
msgid "/lib/lib/udev/rules.d/"
msgstr ""
msgid "When udev is notified by the kernel of the appearance of a new device, it collects various information on the given device by consulting the corresponding entries in /sys/, especially those that uniquely identify it (MAC address for a network card, serial number for some USB devices, etc.)."
msgstr ""
msgid "udevrules"
msgstr ""
msgid "Armed with all of this information, udev then consults all of the rules contained in /etc/udev/rules.d/ and /lib/udev/rules.d/. In this process it decides how to name the device, what symbolic links to create (to give it alternative names), and what commands to execute. All of these files are consulted, and the rules are all evaluated sequentially (except when a file uses “GOTO” directives). Thus, there may be several rules that correspond to a given event."
msgstr ""
msgid "The syntax of rules files is quite simple: each row contains selection criteria and variable assignments. The former are used to select events for which there is a need to react, and the latter defines the action to take. They are all simply separated with commas, and the operator implicitly differentiates between a selection criterion (with comparison operators, such as == or !=) or an assignment directive (with operators such as =, += or :=)."
msgstr ""
msgid "Comparison operators are used on the following variables:"
msgstr ""
msgid "KERNEL: the name that the kernel assigns to the device;"
msgstr ""
msgid "ACTION: the action corresponding to the event (“add” when a device has been added, “remove” when it has been removed);"
msgstr ""
msgid "DEVPATH: the path of the device's /sys/ entry;"
msgstr ""
msgid "SUBSYSTEM: the kernel subsystem which generated the request (there are many, but a few examples are “usb”, “ide”, “net”, “firmware”, etc.);"
msgstr ""
msgid "ATTR{attribute}: file contents of the attribute file in the /sys/$devpath/ directory of the device. This is where you find the MAC address and other bus specific identifiers;"
msgstr ""
msgid "KERNELS, SUBSYSTEMS and ATTRS{attributes} are variations that will try to match the different options on one of the parent devices of the current device;"
msgstr ""
msgid "PROGRAM: delegates the test to the indicated program (true if it returns 0, false if not). The content of the program's standard output is stored so that it can be reused by the RESULT test;"
msgstr ""
msgid "RESULT: execute tests on the standard output stored during the last call to PROGRAM."
msgstr ""
msgid "The right operands can use pattern expressions to match several values at the same time. For instance, * matches any string (even an empty one); ? matches any character, and [] matches the set of characters listed between the square brackets (or the opposite thereof if the first character is an exclamation point, and contiguous ranges of characters are indicated like a-z)."
msgstr ""
msgid "Regarding the assignment operators, = assigns a value (and replaces the current value); in the case of a list, it is emptied and contains only the value assigned. := does the same, but prevents later changes to the same variable. As for +=, it adds an item to a list. The following variables can be changed:"
msgstr ""
msgid "NAME: the device filename to be created in /dev/. Only the first assignment counts; the others are ignored;"
msgstr ""
msgid "SYMLINK: the list of symbolic links that will point to the same device;"
msgstr ""
msgid "OWNER, GROUP and MODE define the user and group that owns the device, as well as the associated permission;"
msgstr ""
msgid "RUN: the list of programs to execute in response to this event."
msgstr ""
msgid "The values assigned to these variables may use a number of substitutions:"
msgstr ""
msgid "$kernel or %k: equivalent to KERNEL;"
msgstr ""
msgid "$number or %n: the order number of the device, for example, for sda3, it would be “3”;"
msgstr ""
msgid "$devpath or %p: equivalent to DEVPATH;"
msgstr ""
msgid "$attr{attribute} or %s{attribute}: equivalent to ATTRS{attribute};"
msgstr ""
msgid "$major or %M: the kernel major number of the device;"
msgstr ""
msgid "$minor or %m: the kernel minor number of the device;"
msgstr ""
msgid "$result or %c: the string output by the last program invoked by PROGRAM;"
msgstr ""
msgid "and, finally, %% and $$ for the percent and dollar sign, respectively."
msgstr ""
msgid "The above lists are not complete (they include only the most important parameters), but the udev 7 manual page should be exhaustive."
msgstr ""
msgid "A concrete example"
msgstr ""
msgid "Let us consider the case of a simple USB key and try to assign it a fixed name. First, you must find the elements that will identify it in a unique manner. For this, plug it in and run udevadm info -a -n /dev/sdc (replacing /dev/sdc with the actual name assigned to the key)."
msgstr ""
msgid ""
"# udevadm info -a -n /dev/sdc\n"
"[...]\n"
" looking at device '/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.0/host4/target4:0:0/4:0:0:0/block/sdc':\n"
" KERNEL==\"sdc\"\n"
" SUBSYSTEM==\"block\"\n"
" DRIVER==\"\"\n"
" ATTR{hidden}==\"0\"\n"
" ATTR{events}==\"media_change\"\n"
" ATTR{ro}==\"0\"\n"
" ATTR{discard_alignment}==\"0\"\n"
" ATTR{removable}==\"1\"\n"
" ATTR{events_async}==\"\"\n"
" ATTR{alignment_offset}==\"0\"\n"
" ATTR{capability}==\"51\"\n"
" ATTR{events_poll_msecs}==\"-1\"\n"
" ATTR{stat}==\"130 0 6328 435 0 0 0 0 0 252 252 0 0 0 0\"\n"
" ATTR{size}==\"15100224\"\n"
" ATTR{range}==\"16\"\n"
" ATTR{ext_range}==\"256\"\n"
" ATTR{inflight}==\"0 0\"\n"
"[...]\n"
"\n"
" looking at parent device '/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.0/host4/target4:0:0/4:0:0:0':\n"
"[...]\n"
" ATTRS{max_sectors}==\"240\"\n"
"[...]\n"
" looking at parent device '/devices/pci0000:00/0000:00:10.0/usb2/2-1':\n"
" KERNELS==\"2-1\"\n"
" SUBSYSTEMS==\"usb\"\n"
" DRIVERS==\"usb\"\n"
" ATTRS{bDeviceProtocol}==\"00\"\n"
" ATTRS{bNumInterfaces}==\" 1\"\n"
" ATTRS{busnum}==\"2\"\n"
" ATTRS{quirks}==\"0x0\"\n"
" ATTRS{authorized}==\"1\"\n"
" ATTRS{ltm_capable}==\"no\"\n"
" ATTRS{speed}==\"480\"\n"
" ATTRS{product}==\"TF10\"\n"
" ATTRS{manufacturer}==\"TDK LoR\"\n"
"[...]\n"
" ATTRS{serial}==\"07032998B60AB777\"\n"
"[...]\n"
""
msgstr ""
msgid "To create a new rule, you can use tests on the device's variables, as well as those of one of the parent devices. The above case allows us to create two rules like these:"
msgstr ""
msgid ""
"KERNEL==\"sd?\", SUBSYSTEM==\"block\", ATTRS{serial}==\"07032998B60AB777\", SYMLINK+=\"usb_key/disk\"\n"
"KERNEL==\"sd?[0-9]\", SUBSYSTEM==\"block\", ATTRS{serial}==\"07032998B60AB777\", SYMLINK+=\"usb_key/part%n\""
msgstr ""
msgid "Once these rules are set in a file, named for example /etc/udev/rules.d/010_local.rules, you can simply remove and reconnect the USB key. You can then see that /dev/usb_key/disk represents the disk associated with the USB key, and /dev/usb_key/part1 is its first partition."
msgstr ""
msgid "GOING FURTHER Debugging udev's configuration"
msgstr ""
msgid "udevd/var/log/daemon.log"
msgstr ""
msgid "udevadm"
msgstr ""
msgid "Like many daemons, udevd stores logs in /var/log/daemon.log. But it is not very verbose by default, and it is usually not enough to understand what is happening. The udevadm control --log-priority=info command increases the verbosity level and solves this problem. udevadm control --log-priority=err returns to the default verbosity level."
msgstr ""
msgid "Power Management: Advanced Configuration and Power Interface (ACPI)"
msgstr ""
msgid "power managementACPI"
msgstr ""
msgid "management, power managementACPI"
msgstr ""
msgid "ACPI"
msgstr ""
msgid "Advanced Configuration and Power InterfaceACPI"
msgstr ""
msgid "acpid"
msgstr ""
msgid "The topic of power management is often problematic. Indeed, properly suspending the computer requires that all the computer's device drivers know how to put them to standby, and that they properly reconfigure the devices upon waking. Unfortunately, there are still a few devices unable to sleep well under Linux, because their manufacturers have not provided the required specifications."
msgstr ""
msgid "Linux supports ACPI (Advanced Configuration and Power Interface) — the most recent standard in power management. The acpid package provides a daemon that looks for power management related events (switching between AC and battery power on a laptop, etc.) and that can execute various commands in response."
msgstr ""
msgid "BEWARE Graphics card and standby"
msgstr ""
msgid "The graphics card driver is often the culprit when standby doesn't work properly. In that case, it is a good idea to test the latest version of the X.org graphics server."
msgstr ""
msgid "After this overview of basic services common to many Unix systems, we will focus on the environment of the administered machines: the network. Many services are required for the network to work properly. They will be discussed in the next chapter."
msgstr ""