[Setup-tool-hackers] users-conf: Reading comments??



Hi all,

I have found that the users-conf script reads lines starting with '#' ie.
a comment, and tries to enter them as users.

Is this right?  Is there a standard for commenting in /etc/passwd, or is
the use of '#' in the username field bad?

Thanks,

- Shane

PS. see attachments for an example of what I mean.

--
Shane Butler <sbutle@deakin.edu.au>

  <userdb>

    <user>
      <key>000000</key>
      <login>##</login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000001</key>
      <login># User Database</login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000002</key>
      <login># </login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000003</key>
      <login># Note that this file is consulted when the system is running in single-user</login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000004</key>
      <login># mode.  At other times this information is handled by lookupd.  By default,</login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000005</key>
      <login># lookupd gets information from NetInfo, so this file will not be consulted</login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000006</key>
      <login># unless you have changed lookupd's configuration.</login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000007</key>
      <login>##</login>
      <password></password>
      <uid></uid>
      <gid></gid>
      <comment></comment>
      <home></home>
      <shell></shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000008</key>
      <login>unknown</login>
      <password>*</password>
      <uid>-3</uid>
      <gid>-3</gid>
      <comment>Unknown User</comment>
      <home>/nohome</home>
      <shell>/noshell</shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000009</key>
      <login>nobody</login>
      <password>*</password>
      <uid>-2</uid>
      <gid>-2</gid>
      <comment>Unprivileged User</comment>
      <home>/nohome</home>
      <shell>/noshell</shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000010</key>
      <login>root</login>
      <password>*</password>
      <uid>0</uid>
      <gid>0</gid>
      <comment>System Administrator</comment>
      <home>/var/root</home>
      <shell>/bin/tcsh</shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000011</key>
      <login>daemon</login>
      <password>*</password>
      <uid>1</uid>
      <gid>1</gid>
      <comment>System Services</comment>
      <home>/var/root</home>
      <shell>/noshell</shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

    <user>
      <key>000012</key>
      <login>www</login>
      <password>*</password>
      <uid>70</uid>
      <gid>70</gid>
      <comment>World Wide Web Server</comment>
      <home>/Library/WebServer</home>
      <shell>/noshell</shell>
      <last_mod></last_mod>
      <passwd_min_life></passwd_min_life>
      <passwd_max_life></passwd_max_life>
      <passwd_exp_warn></passwd_exp_warn>
      <passwd_exp_disable></passwd_exp_disable>
      <passwd_disable></passwd_disable>
      <reserved></reserved>
      <is_shadow></is_shadow>
    </user>

  </userdb>
##
# User Database
# 
# Note that this file is consulted when the system is running in single-user
# mode.  At other times this information is handled by lookupd.  By default,
# lookupd gets information from NetInfo, so this file will not be consulted
# unless you have changed lookupd's configuration.
##
unknown:*:-3:-3:Unknown User:/nohome:/noshell
nobody:*:-2:-2:Unprivileged User:/nohome:/noshell
root:*:0:0:System Administrator:/var/root:/bin/tcsh
daemon:*:1:1:System Services:/var/root:/noshell
www:*:70:70:World Wide Web Server:/Library/WebServer:/noshell


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]