LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1854|回复: 8

请教:root,bin,daemon,adm这些用户的权限有什么区别?

[复制链接]
发表于 2005-4-8 12:28:50 | 显示全部楼层 |阅读模式
root,bin,daemon,adm这些用户的权限有什么区别?

    我试验的对象是adm,此用户的默认shell是/sbin/nologin,主目录是/var/adm.
      我给adm用户设置密码,并改为shell是/bin/bash,建立/home/adm并更改主目录为/home/adm.
      但是,我发现这个用户的权限好像和ID500以上的普通用户一样啊,这是这么回事??敬请大虾赐教,谢谢!!
发表于 2005-4-8 12:37:04 | 显示全部楼层
  1. root

  2.     Root is (typically) the superuser.

  3. daemon

  4.     Some unprivileged daemons that need to be able to write to some files on
  5.     disk run as daemon.daemon (portmap, atd, jabberd, lambdamoo, mon, and
  6.     others). Daemons that don't need to own any files sometimes run as
  7.     nobody.nogroup instead; it is generally better practice to use a dedicated
  8.     user, and more complex or security-conscious daemons certainly do this. The
  9.     daemon user is also handy for locally installed daemons, probably.

  10.     LSB 1.3 lists daemon as legacy, and says: "The 'daemon' UID/GID was used as
  11.     an unprivileged UID/GID for daemons to execute under in order to limit
  12.     their access to the system. Generally daemons should now run under
  13.     individual UID/GIDs in order to further partition daemons from one
  14.     another."

  15. bin

  16.     HELP: No files on my system are owned by user or group bin. What good are
  17.     they? Historically they were probably the owners of binaries in /bin? It is
  18.     not mentioned in the FHS, Debian Policy, or the changelogs of base-passwd
  19.     or base-files.

  20.     LSB 1.3 lists bin as legacy, and says: "The 'bin' UID/GID is included for
  21.     compatibility with legacy applications. New applications should no longer
  22.     use the 'bin' UID/GID."

  23. sys

  24.     HELP: As with bin, except I don't even know what it was good for
  25.     historically.

  26.     I'm told that /var/spool/cups is owned by group sys, dunno why.

  27. sync

  28.     The shell of user sync is /bin/sync. Thus, if its password is set to
  29.     something easy to guess (such as ""), anyone can sync the system at the
  30.     console even if they have no account on the system.

  31. games

  32.     Many games are sgid to games so they can write their high score files. This
  33.     is explained in Debian Policy.

  34. man

  35.     The man program (sometimes) runs as user man, so it can write cat pages to
  36.     /var/cache/man and update its databases there.

  37. lp

  38.     The lp* devices are writable by this group so that users in it can access
  39.     the parallel ports directly. Traditionally this job is taken by a printer
  40.     daemon instead which will only need to run in this group.

  41.     The lpr system keeps its spool directories owned by lp/lp. Its daemon and
  42.     frontend tools (through setuid) run as user root.

  43.     HELP: what do other print systems (rlpr, cupsys, lprng, ...) do?

  44. mail

  45.     Mailboxes in /var/mail are owned and writeable by group mail, as is
  46.     explained in Debian Policy. The user and group is used for other purposes
  47.     as well by various MTAs and MUAs.

  48. news

  49.     Various news servers and other associated programs (such as suck) use user
  50.     and group news in various ways. Files in the news spool are often owned by
  51.     user and group news. Programs such as inews that can be used to post news
  52.     are typically sgid news.

  53. uucp

  54.     The uucp user and group is used by the UUCP subsystem. It owns spool and
  55.     configuration files. Users in the uucp group may run uucico.

  56. proxy

  57.     Like daemon, this user and group is used by some daemons (specifically,
  58.     proxy daemons) that don't have dedicated user ids and that need to own
  59.     files. For example, group proxy is used by pdnsd, and squid runs as user
  60.     proxy.

  61. majordom

  62.     Majordomo has a statically allocated uid on Debian systems for historical
  63.     reasons. It is not installed on new systems.

  64. postgres

  65.     Postgresql databases are owned by this user and group.

  66. www-data

  67.     Some web servers run as www-data. Web content should not be owned by this
  68.     user, or a compromised web server would be able to rewrite a web site. Data
  69.     written out by web servers, including log files, will be owned by www-data.

  70. backup

  71.     Presumably so backup/restore responsibilities can be locally delegated to
  72.     someone without full root permissions?

  73.     HELP: Is that right? Amanda reportedly uses this, details?

  74. operator

  75.     Historically, the operator user account was used by system operators with
  76.     low privilege to dump filesystem backups to tape, and was in the root group
  77.     so that it could do this. In Debian, the use of a utility such as sudo to
  78.     gain privilege is preferred over such highly-special-purpose accounts, and
  79.     the operator user is no longer created by default. It had uid 37.

  80.     The operator group is used by dump -n to notify logged-in operators via
  81.     wall when it requires operator attention. This is a historical use, and new
  82.     applications should not behave this way. (If nothing else, the group should
  83.     be configurable.)

  84. list

  85.     Mailing list archives and data are owned by this user and group. Some
  86.     mailing list programs may run as this user as well.

  87. irc

  88.     Used by IRC daemons. A statically allocated user is needed only because of
  89.     a bug in ircd: it setuid()s itself to a compiled-in user id on startup.

  90. gnats

  91.     HELP: Evidently used by gnats. And it needs a static set why?

  92. nobody, nogroup

  93.     Daemons that need not own any files sometimes run as user nobody and group
  94.     nogroup, although using a dedicated user is far preferable. Thus, no files
  95.     on a system should be owned by this user or group.

  96.     (Technically speaking, it does no harm for a file to be owned by group
  97.     nogroup as long as the ownership confers no additional privileges, that is
  98.     if the group and other permission bits are equal. However, this is sloppy
  99.     practice and should be avoided.)

  100.     If root-squashing is in use over NFS, root access from the client is
  101.     performed as user nobody on the server.

  102. Other groups have no associated user.

  103. adm

  104.     Group adm is used for system monitoring tasks. Members of this group can
  105.     read many log files in /var/log, and can use xconsole.

  106.     Historically, /var/log was /usr/adm (and later /var/adm), thus the name of
  107.     the group.

  108.     HELP: Perhaps policy should state the purpose of this group so users may be
  109.     safely added to it, in certainty that all they'll be able to do is read
  110.     logs. Wouldn't hurt to rename it 'log' either ...

  111. tty

  112.     Tty devices and /dev/vcs* are owned by this group. This is used by write
  113.     and wall to enable them to write to other people's ttys.

  114. disk

  115.     Raw access to disks. Mostly equivalent to root access.

  116.     HELP: Well, I have some disk devices in /dev owned by the group, but I
  117.     can't see the point. On another system, I noticed that some of the files
  118.     lilo puts in /boot are also owned by disk. I can imagine local uses for
  119.     such a group, like if you want to give some users in the group direct
  120.     access to some hard disk. But these uses I've found on my systems seem to
  121.     preclude doing that easily; if I put a user in group disk here, they'd have
  122.     write access to the root filesystem.

  123. kmem

  124.     /dev/kmem and similar files are readable by this group. This is mostly a
  125.     BSD relic, but any programs that need direct read access to the system's
  126.     memory can thus be made setgid kmem.

  127. dialout

  128.     Full and direct access to serial ports. Members of this group can
  129.     reconfigure the modem, dial anywhere, etc.

  130. dip

  131.     The group's name stands for "Dialup IP". Being in group dip allows you to
  132.     use a tool such as ppp or dip to dial up a connection.

  133. fax

  134.     Allows members to use fax software to send or receive faxes.

  135. voice

  136.     Voicemail, useful for systems that use modems as answering machines.

  137. cdrom

  138.     This group can be used locally to give a set of users access to a CD-ROM
  139.     drive.

  140. floppy

  141.     This group can be used locally to give a set of users access to a floppy
  142.     drive.

  143. tape

  144.     This group can be used locally to give a set of users access to a tape
  145.     drive.

  146. sudo

  147.     Members of this group do not need to type their password when using sudo.
  148.     See /usr/share/doc/sudo/OPTIONS.

  149. audio

  150.     This group can be used locally to give a set of users access to an audio
  151.     device.

  152. src

  153.     This group owns source code, including files in /usr/src. It can be used
  154.     locally to give a user the ability to manage system source code.

  155.     HELP: /usr/src is owned by group src and is setgid. This doesn't make files
  156.     put there by foo-src packages necessarily be owned by group src though. If
  157.     the intent is to make group src be able to manage source code, perhaps
  158.     policy should say that foo-src packages make files in /usr/src owned and
  159.     writeable by the group (and files in tarballs dropped there likewise)?

  160. shadow

  161.     /etc/shadow is readable by this group. Some programs that need to be able
  162.     to access the file are setgid shadow.

  163. utmp

  164.     This group can write to /var/run/utmp, /var/log/wtmp, /var/log/lastlog, and
  165.     similar files. Programs that need to be able to write to them (such as X
  166.     terminal emulators) are setgid utmp.

  167. video

  168.     This group can be used locally to give a set of users access to a video
  169.     device.

  170. plugdev

  171.     Members of this group can mount removable devices in limited ways via
  172.     pmount without a matching entry in /etc/fstab. This is useful for local
  173.     users who expect to be able to insert and use CDs, USB drives, and so on.

  174.     Since pmount always mounts with the nodev and nosuid options and applies
  175.     other checks, this group is not intended to be root-equivalent in the ways
  176.     that the ability to mount filesystems might ordinarily allow. Implementors
  177.     of semantics involving this group should be careful not to allow
  178.     root-equivalence.

  179. staff

  180.     Allows users to add local modifications to the system (/usr/local, /home)
  181.     without needing root privileges. Compare with group 'adm', which is more
  182.     related to monitoring/security.

  183. users

  184.     While Debian systems use the user-group system by default (each user has
  185.     their own group), some prefer to use a more traditional group system. In
  186.     that system, each user is a member of the 'users' group.

复制代码


Debian中base-passwd文档中的部分内容,但各个发行版还是有些区别的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-8 12:47:28 | 显示全部楼层
非常感谢!
回复 支持 反对

使用道具 举报

发表于 2005-4-8 12:53:27 | 显示全部楼层
root:超级用户,就是管理员,拥有所有权限
bin:历史遗留用户
daemon:守护进程,非特权的、需要对一些以磁盘文件有写权限的daemon以daemon.daemon(portmap,atd,etc)运行;不需要占有任何文件的daemon 以nobody.nogroup运行;比较复杂的、涉及安全问题的daemon以特定的用户运行。daemon用户也方便本地安装的daemon运行。
adm:adm组执行系统监控任务,组成员可以读取/var/log下的多数文件,可以使用xconsole。历史上/var/log来自于/usr/adm,后来叫/var/adm,这也是组名称的由来。
回复 支持 反对

使用道具 举报

发表于 2010-10-6 09:47:27 | 显示全部楼层
这是在哪个man 下的?
回复 支持 反对

使用道具 举报

发表于 2010-10-6 10:09:56 | 显示全部楼层
找到了/usr/share/doc/base-passwd
回复 支持 反对

使用道具 举报

发表于 2010-10-6 23:21:46 | 显示全部楼层
收到邮件,5年啦。
回复 支持 反对

使用道具 举报

发表于 2010-10-7 15:12:30 | 显示全部楼层
汗~五年的贴子翻出来了.
回复 支持 反对

使用道具 举报

发表于 2010-10-26 08:34:37 | 显示全部楼层
这坟挖的……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表