mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
fix(netrc): review notes
This commit is contained in:
@@ -2,34 +2,35 @@
|
|||||||
|
|
||||||
Specifies automatic login information for the `ftp` and `rexec` commands.
|
Specifies automatic login information for the `ftp` and `rexec` commands.
|
||||||
|
|
||||||
It is located under a user's home directory (`~/.netrc`) and must be owned
|
1. [TL;DR](#tldr)
|
||||||
either by the user executing the command or by the root user.
|
|
||||||
If the .netrc file contains a login password, the file's permissions must be set
|
|
||||||
to `600` (read and write by its owner only).
|
|
||||||
|
|
||||||
## Table of contents <!-- omit in toc -->
|
|
||||||
|
|
||||||
1. [Format](#format)
|
1. [Format](#format)
|
||||||
1. [Further readings](#further-readings)
|
1. [Further readings](#further-readings)
|
||||||
|
|
||||||
|
## TL;DR
|
||||||
|
|
||||||
|
Located under a user's home directory (`~/.netrc`).<br/>
|
||||||
|
It **must** be owned by either the user executing the command, or by the `root` user.<br/>
|
||||||
|
|
||||||
|
If a `.netrc` file contains a login password, the file's permissions **must** be set to `600` (read and write for its
|
||||||
|
owner only).
|
||||||
|
|
||||||
## Format
|
## Format
|
||||||
|
|
||||||
The file can contain the following entries separated by spaces, tabs, or new
|
The file can contain the following entries separated by spaces, tabs, or new lines:
|
||||||
lines:
|
|
||||||
|
|
||||||
- `machine` _hostname_: this begins the definition of the automatic login
|
- `machine` _hostname_: starts the definition of the automatic login process for the specified _hostname_.<br/>
|
||||||
process for the specified _hostname_; all the following entries, up to a new
|
All entries following this key, up to a new `machine` entry or the end of the file, will apply to just the specified
|
||||||
`machine` entry or the end of the file, will apply to _hostname_
|
_hostname_.
|
||||||
- `default`: like `machine`, but matches any hostname; there can be only 1 in
|
- `default`: works like `machine`, but matches **any** hostname.<br/>
|
||||||
the whole file and it is considered the last entry (entries following it will
|
There can be only 1 in the whole file, and it must the last entry. Entries following this key will be ignored.
|
||||||
be ignored)
|
- `login` _username_: the full user name used for authentication; if found, the automatic login process initiates a
|
||||||
- `login` _username_: the full domain user name used for authentication; if
|
login with the specified _username_, otherwise it will fail.
|
||||||
found the automatic login process initiates a login with the specified
|
- `password` _password_: the password to use for authentication.<br/>
|
||||||
_username_, else it will fail
|
It **must** be set at the remote host, and must be present in `.netrc`. Otherwise, the process will fail and the user
|
||||||
- `password` _password_: the password to use for authentication; it must be
|
will be prompted for a new value.
|
||||||
set at the remote host and must be present in `.netrc`, otherwise the process
|
|
||||||
will fail and the user is prompted for a new value
|
> [!warning]
|
||||||
> passwords in this fields cannot contain spaces
|
> Passwords in this fields **cannot** contain spaces.
|
||||||
|
|
||||||
The two formats below are equivalent:
|
The two formats below are equivalent:
|
||||||
|
|
||||||
@@ -52,7 +53,8 @@ password bluebonnet
|
|||||||
- [netrc]
|
- [netrc]
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
References
|
Reference
|
||||||
|
═╬═Time══
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Others -->
|
<!-- Others -->
|
||||||
|
|||||||
Reference in New Issue
Block a user