当前位置: 首页>>技术教程>>正文


这些用户的默认密码是什么:nobody、daemon、uucp 等?

问题描述

这些用户的默认密码是什么?

  • root

  • daemon

  • bin

  • sys

  • sync

  • games

  • man

  • lp

  • mail

  • news

  • uucp

  • nobody

任何人都可以通过 ssh 或 ftp 作为这些用户登录吗?

最佳方法

\\n

what are default password of these users : root, daemon, bin, sys, sync, games, man, lp, mail, news, uucp, nobody.

\\n

您可以通过查看第二个字段的影子密码文件 (/etc/shadow) 来检查状态。默认情况下,这些帐户被锁定(密码设置为 * ),这会禁用登录。

\\n

Can anyone login through ssh or ftp by these users ??

\\n

除非您为它们设置了密码,否则不会。

次佳方法

如果您查看密码文件,您会发现它们具有特定的设置(以游戏为例):

$ more /etc/passwd|grep games
games:x:5:60:games:/usr/games:/bin/sh

第 3 个(: 为分隔符):

  • 姓名

  • 密码。 x 字符表示加密的密码存储在 /etc/shadow 文件中。

  • 用户 ID (UID):1-99 保留给其他预定义帐户。

密码经过哈希处理(如果以 $ 开头,则表示已加密)。

关于/etc/shadow

\\n

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).

\\n


\\n

Can anyone login through ssh or ftp by these users ??

\\n

默认情况下不是。理论上,您可以创建一个名为 games 的用户作为实际用户,或者更改用户 games 的密码。

第三种方法

nobody 这样的登录通常是 “locked”,因此不可能使用密码登录(无论如何,不​​是 SSH、不是 FTP、不是 su 命令等)

http://manpages.ubuntu.com/manpages/hardy/man1/passwd.1.html

-l, --lock
    Lock the named account. This option disables an account by changing
    the password to a value which matches no possible encrypted value,
    and by setting the account expiry field to 1.

但是,如果您具有 sudo 访问权限,则可以使用如下命令切换到这些帐户:

$ sudo su nobody

这是因为super-user无需输入密码即可更改为任何帐户

第四种方法

大多数此类用户是为某些服务保留的,您无法登录,此类用户的目的是当其被黑客攻击时,对您的系统的影响最小,就像没有密码的nobody用户一样,攻击者可以知道。

Ubuntu 默认情况下 root 帐户因安全问题而被锁定,您可以使用 sudo 获得管理员权限,并且密码未知且已加密。

此外 ,

其中一些用户是拥有有效 shell 且没有密码的用户(例如 bin )

它无法通过 ssh 连接,因为它需要 /bin/.ssh/authorized_keys 才能连接。

换句话说,这些用户是安全用户,而不是基于登录的用户。

请注意,不建议更改这些用户的状态(更改密码或锁定或解锁)

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/14475.html,未经允许,请勿转载。