Manpages

名 称

shadow - 影 子 化 了 的 密 码 文 件

描 述

shadow is a file which contains the password information for the system's accounts and optional aging information. 如 果 没 有 维 护 好 密 码 安 全 , 此 文 件 绝 对 不 能 让 普 通 用 户 可 读 。

Each line of this file contains 9 fields, separated by colons (“:”), in the following order: 登 录 名 必 须 是 有 效 的 账 户 名 , 且 已 经 存 在 于 系 统 中 。 加 密 了 的 密 码

This field may be empty, in which case no passwords are required to authenticate as the specified login name. However, some applications which read the /etc/shadow file may decide not to permit any access at all if the password field is empty.

A password field which starts with an exclamation mark means that the password is locked. The remaining characters on the line represent the password field before the password was locked.

Refer to crypt(3) for details on how this string is interpreted.

If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, the user will not be able to use a unix password to log in (but the user may log in the system by other means). 最 后 一 次 更 改 密 码 的 日 期
The date of the last password change, expressed as the number of days since Jan 1, 1970 00:00 UTC.

The value 0 has a special meaning, which is that the user should change her password the next time she will log in the system. 空 字 段 表 示 密 码 年 龄 功 能 被 禁 用 。 密 码 的 最 小 年 龄 最 小 密 码 年 龄 是 指 , 用 户 一 次 更 改 密 码 之 后 , 要 等 多 长 时 间 才 再 次 被 允 许 更 改 密 码 。

An empty field and value 0 mean that there is no minimum password age. 最 大 密 码 年 龄 最 大 密 码 年 龄 是 指 , 这 写 天 之 后 , 用 户 必 须 更 改 密 码 。 这 写 天 之 后 , 密 码 仍 然 可 用 。 用 户 将 会 在 下 次 登 录 的 时 候 被 要 求 更 改 密 码 。 空 字 段 表 示 没 有 最 大 密 码 年 龄 , 没 有 密 码 警 告 时 间 段 , 没 有 密 码 禁 用 时 间 段 (请 看 下 边 )。 如 果 最 大 密 码 年 龄 小 于 最 小 密 码 年 龄 , 用 户 将 会 不 能 更 改 密 码 。 密 码 警 告 时 间 段 密 码 过 期 之 前 , 提 前 警 告 用 户 的 的 天 数 (请 参 考 上 边 的 密 码 的 最 大 年 龄 )。 空 字 段 或 者 0 表 示 没 有 密 码 警 告 期 。 密 码 禁 用 期 密 码 过 期 (查 看 上 边 的 密 码 最 大 年 龄 )后 , 仍 然 接 受 此 密 码 的 天 数 (在 此 期 间 , 用 户 应 该 在 下 次 登 录 时 修 改 密 码 )。

After expiration of the password and this expiration period is elapsed, no login is possible for the user. The user should contact her administrator. 空 字 段 表 示 没 有 强 制 密 码 过 期 。 账 户 过 期 日 期
The date of expiration of the account, expressed as the number of days since Jan 1, 1970 00:00 UTC.

Note that an account expiration differs from a password expiration. In case of an account expiration, the user shall not be allowed to login. In case of a password expiration, the user is not allowed to login using her password. 空 字 段 表 示 账 户 永 不 过 期 。 应 该 避 免 使 用 0, 因 为 它 既 能 理 解 成 永 不 过 期 也 能 理 解 成 在 1970年 1月 1日 过 期 。 保 留 字 段 此 字 段 保 留 作 将 来 使 用 。

文 件

/etc/passwd 用 户 账 户 信 息 。

/etc/shadow 安 全 用 户 账 户 信 息 。

/etc/shadow-

/etc/shadow 的 备 份 文 件 。 注 意 , 此 文 件 由 shadow 工 具 集 使 用 , 而 不 是 所 有 的 用 户 和 密 码 管 理 工 具 都 会 使 用 。

参 见

chage(1), login(1), passwd(1), passwd(5), pwck(8), pwconv(8), pwunconv(8), su(1), sulogin(8).