<?xml version="1.0" encoding="UTF-8"?>

<!--

	Subversion stuff

	$Id$

	 -->

<!--

	This specification-by-example defines a key tree layout for users, groups and password.

	Its purpose is similar to the Unix well-known files:

	 /etc/passwd
	 /etc/group
	 /etc/shadow

	It defines 2 trees, system/users and system/groups
	All keys must be owned by root with RO permissions to others, except for the
	password keys which should be readable only by root.

	In this example we'll define the 'jdoe' user and 'root' keys.

	Avi Alkalay
	<avi at unix.sh>
	Nov 2005

-->



<keyset xmlns="https://www.libelektra.org"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="https://www.libelektra.org elektra.xsd"

        parent="system">



	<key basename="users/jdoe">
		<!-- The 'jdoe' record -->

		<!-- Real name -->
		<key basename="gecos" value="John Doe"/>

		<!-- User and group IDs -->
		<key basename="uid" value="500"/>
		<key basename="gid" value="800"/>

		<!-- Home directory and shell program -->
		<key basename="home" value="/root"/>
		<key basename="shell" value="/bin/bash"/>

		<!-- Password metainfo as /etc/shadow.
			  Check the 'mode' attribute, meaning they are secure keys -->
		<key basename="passwdChangeAfter" mode="0600" value="99999"/>
		<key basename="passwdChangeBefore" mode="0600" value="0"/>
		<key basename="passwdDisableAfter" mode="0600"/>
		<key basename="passwdDisabledSince" mode="0600"/>
		<key basename="passwdReserved" mode="0600"/>
		<key basename="passwdWarnBefore" mode="0600" value="7"/>

		<!-- Obsolete key.... from /etc/passwd -->
		<key basename="password" mode="0644" value="x"/>

		<!-- Real password goes here in encrypted form -->
		<key basename="shadowPassword" mode="0600" value="an encrypted passwd should appear here"/>
	</key>


	<!-- The group which jdoe is member of -->
	<key basename="groups/guests">
		<key basename="gid" value="800"/>
		<key basename="members" value="jdoe,miriam,ana"/>
	</key>









	<!-- The 'root' record -->

	<key basename="users/root">
		<key basename="gecos" value="root"/>
		<key basename="uid" value="0"/>
		<key basename="gid" value="0"/>
		<key basename="home" value="/root"/>
		<key basename="shell" value="/bin/bash"/>
		<key basename="passwdChangeAfter" mode="0600" value="99999"/>
		<key basename="passwdChangeBefore" mode="0600" value="0"/>
		<key basename="passwdDisableAfter" mode="0600"/>
		<key basename="passwdDisabledSince" mode="0600"/>
		<key basename="passwdReserved" mode="0600"/>
		<key basename="passwdWarnBefore" mode="0600" value="7"/>
		<key basename="password" mode="0644" value="x"/>
		<key basename="shadowPassword" mode="0600" value="an encrypted passwd should appear here"/>
	</key>


	<key basename="groups/root">
		<key basename="gid" value="0"/>
		<key basename="members" value="root"/>
	</key>



	<!-- Just another group that has root as a member -->
	<key basename="groups/sys">
		<key basename="gid" value="3"/>
		<key basename="members" value="root,bin,adm"/>
	</key>


</keyset>
