Files
makronix/docs/guide/chapters/users.xml
T
lotherk b654bf74a2 docs: add The Makronix Guide and its four installed forms
One DocBook source in docs/guide produces the manual pages, one HTML
file, the PDF and an MCDE information library.  The guide follows the
structure of The NetBSD Guide, describes Makronix 0.99.10
(Camouflage), and has its own chapters for MCDE, the Information
Manager and the display.

The forms are installed by the release:

  /usr/share/doc/makronix/makronix-guide.html
  /usr/share/doc/makronix/makronix-guide.pdf
  /usr/share/doc/makronix/infolib/makronix.dti/   (base-sys-share)
  /usr/share/man/man7/makronix-guide*.7           (man-reference-man)
  /etc/dt/config/Xsession.d/0000makronix          (etc-sys-etc)
  /etc/dt/infolib/en_US.UTF-8/makronix.dti        (symlink)

The information library is built with MCDE's dtdocbook2infolib from a
small Lua writer for the CDE DocBook SGML dialect; tools/test-tools.sh
runs docs/guide/check.sh on the installed copies and proves that a
missing manual page falls red.
2026-11-15 21:21:49 +00:00

96 lines
4.5 KiB
XML

<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="users">
<title>Users and Accounts</title>
<para>Makronix is a machine for people: the installer creates one account
for the person who uses it, and that account is in the groups a desktop
needs. More accounts are added with NetBSD's user tools, and the same
accounts appear at the login screen and in System Settings.</para>
<sect1 id="users-database">
<title>Where the accounts live</title>
<para><filename>/etc/master.passwd</filename> is the real database;
<filename>/etc/passwd</filename> is its public view, without the
password hashes. Both are generated from the master file by
<citerefentry><refentrytitle>pwd_mkdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
The group database is <filename>/etc/group</filename>. Edit them with
<citerefentry><refentrytitle>vipw</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and <citerefentry><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>
rather than with a text editor that does not know about the locks.</para>
<para>Each account has a home directory, a login shell and a list of
groups. A new account gets the files from
<filename>/etc/skel</filename>, which is where a site puts its default
<filename>.profile</filename> and desktop files.</para>
</sect1>
<sect1 id="users-add">
<title>Adding an account</title>
<screen># useradd -m -G wheel,operator,staff,users,dialer,games,wsrc \
-c "Full Name" -s /bin/sh name
# passwd name</screen>
<para><command>useradd</command> creates the home directory with
<option>-m</option>, puts the account in the named groups and sets the
shell. <command>passwd</command> then sets the password; without it the
account cannot log in. The groups are the ones the installer uses:</para>
<variablelist>
<varlistentry><term>wheel</term><listitem><para>May use
<command>su</command> to become root.</para></listitem></varlistentry>
<varlistentry><term>operator</term><listitem><para>May use the
operator commands (shutdown, and the disk tools that are marked for
it).</para></listitem></varlistentry>
<varlistentry><term>staff</term><listitem><para>The usual group for
files that a team shares.</para></listitem></varlistentry>
<varlistentry><term>users</term><listitem><para>The ordinary users of
the machine.</para></listitem></varlistentry>
<varlistentry><term>dialer</term><listitem><para>May use the serial
ports and the modems.</para></listitem></varlistentry>
<varlistentry><term>games</term><listitem><para>May write the games'
score files.</para></listitem></varlistentry>
<varlistentry><term>wsrc</term><listitem><para>May write the source
tree under <filename>/usr/src</filename>.</para></listitem></varlistentry>
</variablelist>
<para>The same operation is in System Settings under
<guilabel>Users</guilabel>; it asks for the administrator's password and
writes the same files.</para>
</sect1>
<sect1 id="users-change">
<title>Changing and removing an account</title>
<screen># usermod -G wheel,operator,staff,users,dialer,games,wsrc name
# chsh -s /usr/pkg/bin/ksh93 name
# userdel -r name</screen>
<para><command>usermod</command> changes the groups, the shell, the full
name or the home directory; <command>chsh</command> changes the shell of
the account that runs it. <command>userdel -r</command> removes the
account and its home directory; without <option>-r</option> the files
stay. A removed account leaves its files owned by a number; find them
with <command>find / -nouser -print</command> before you delete anything
else.</para>
</sect1>
<sect1 id="users-password">
<title>Passwords</title>
<para>Passwords are stored as hashes in
<filename>/etc/master.passwd</filename>, which only root can read. A
user changes their own with <command>passwd</command>; root changes
another with <command>passwd name</command>. The password quality is
the administrator's business: a desktop machine on a home network needs
a different policy from a machine that is reachable from the
Internet.</para>
<para>If a password is lost, root sets a new one from a single-user boot
or from another account in the wheel group. The fact that this is
possible is the reason a machine left alone in a public place must be
locked, not only logged out.</para>
</sect1>
</chapter>