Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2012 03:20:04 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242123 - in head/usr.sbin/bsdconfig/usermgmt: . include
Message-ID:  <201210260320.q9Q3K4xQ010154@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Fri Oct 26 03:20:04 2012
New Revision: 242123
URL: http://svn.freebsd.org/changeset/base/242123

Log:
  Resurrect and integrate stable/9/usr.sbin/sysinstall/help/usermgmt.hlp
  
  Approved by:	adrian (co-mentor) (implicit)

Added:
  head/usr.sbin/bsdconfig/usermgmt/include/usermgmt.hlp   (contents, props changed)
Modified:
  head/usr.sbin/bsdconfig/usermgmt/include/Makefile
  head/usr.sbin/bsdconfig/usermgmt/usermgmt

Modified: head/usr.sbin/bsdconfig/usermgmt/include/Makefile
==============================================================================
--- head/usr.sbin/bsdconfig/usermgmt/include/Makefile	Fri Oct 26 03:12:40 2012	(r242122)
+++ head/usr.sbin/bsdconfig/usermgmt/include/Makefile	Fri Oct 26 03:20:04 2012	(r242123)
@@ -3,7 +3,7 @@
 NO_OBJ=
 
 FILESDIR=	${LIBEXECDIR}/bsdconfig/070.usermgmt/include
-FILES=		messages.subr
+FILES=		messages.subr usermgmt.hlp
 
 beforeinstall:
 	mkdir -p ${DESTDIR}${FILESDIR}

Added: head/usr.sbin/bsdconfig/usermgmt/include/usermgmt.hlp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/usermgmt/include/usermgmt.hlp	Fri Oct 26 03:20:04 2012	(r242123)
@@ -0,0 +1,76 @@
+These screens allow you to add groups and users to your system.
+
+Many of the settings get reasonable defaults if you leave them blank.
+The first time you have entered the name of the new group or user, the
+system will show you what it would chose for most of these fields.
+You are free to change them, of course.
+
+
+User groups
+===========
+
+It's certainly almost generally a good idea to first create a new
+group for your users.  Common names for such a group are "users", or
+even simply "other".  Group names are used to control file access
+permissions for users that belong to the same group.  Several group
+names are already used for system files.
+
+The numerical user or group IDs are often nothing you want to care for
+explicitly.  If you don't fill in these fields, the system will choose
+reasonable defaults.  However, these numbers (rather than the
+associated names) are what the operating system actually uses to
+distinguish users and groups -- hence they should normally be unique
+to each person or group, respectively.
+
+
+Users
+=====
+
+The user's login ID is a short (up to 15 characters) alphanumeric ID
+that the user must enter when logging into the system.  It's often the
+initial letters of the user's name, and commonly used in lower case.
+It's also the local mail name for this user (though it's possible to
+also set up more descriptive mail alias names later).
+
+The user's login group determines which group access rights the user
+will initially get when logging in.  If an additional list of groups is
+provided which the user will become a member of, (s)he will also be
+able to access files of those groups later without providing any
+additional password etc.  Except for the "wheel" case mentioned below,
+the additional group membership list should normally not contain the
+login group again.
+
+The user's password can also be set here, and should be chosen with
+care - 6 or more characters, intermixing punctuation and numerics, and
+*not* a word from the dictionary or related to the username is a good
+password choice.
+
+Some of the system's groups have a special meaning.  In particular,
+members of group "wheel" are the only people who are later allowed to
+become superuser using the command su(1).  So if you're going to add a
+new user who should later perform administrative tasks, don't forget
+to add him to this group!  (Well, ``he'' will most likely be yourself
+in the very first place. :)
+
+Also, members of group "operator" will by default get permissions for
+minor administrative operations, like performing system backups, or
+shutting down the system -- without first becoming superuser!  So,
+take care when adding people to this group.
+
+The ``full name'' field serves as a comment only.  It is also used by
+mail front ends to determine the real name of the user, hence you
+should actually fill in the first and last name of this user.  By
+convention, this field can be divided into comma-separated subfields,
+where the office location, the work phone number, and the home phone
+number follow the full name of the user.
+
+The home directory is the directory in the filesystem where the user
+is being logged into, and where his personalized setup files (``dot
+files'', since they usually begin with a `.' and are not displayed by
+the ls(1) command by default) will be looked up.  It is often created
+under /usr/home/ or /home/.
+
+Finally, the shell is the user's initial command interpreter.  The
+default shell is /bin/sh, some users prefer the more historic
+/bin/csh.  Other, often more user-friendly and comfortable shells can
+be found in the ports and packages collection.

Modified: head/usr.sbin/bsdconfig/usermgmt/usermgmt
==============================================================================
--- head/usr.sbin/bsdconfig/usermgmt/usermgmt	Fri Oct 26 03:12:40 2012	(r242122)
+++ head/usr.sbin/bsdconfig/usermgmt/usermgmt	Fri Oct 26 03:20:04 2012	(r242123)
@@ -37,6 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
+USERMGMT_HELPFILE=$BSDCFG_LIBE/$APP_DIR/include/usermgmt.hlp
+
 ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
 [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
 
@@ -69,6 +71,14 @@ dialog_menu_main()
 	        	\"\$hline\"            \
 	        	$menu_list             )
 
+	if [ "$USE_XDIALOG" ]; then
+		# need to bump the width for the buttons
+		local height menu_height
+		height="${size%%[$IFS]*}" # first word
+		menu_height="${size##*[$IFS]}" # last word
+		size="$height 40 $menu_height"
+	fi
+
 	local dialog_menu
 	dialog_menu=$( eval $DIALOG \
 		--clear --title \"\$DIALOG_TITLE\" \
@@ -76,6 +86,8 @@ dialog_menu_main()
 		--hline \"\$hline\"                \
 		--ok-label \"\$msg_ok\"            \
 		--cancel-label \"\$msg_cancel\"    \
+		--help-button                      \
+		${USE_XDIALOG:+--help \"\"}        \
 		--menu \"\" $size $menu_list       \
 		2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
 	)
@@ -116,7 +128,13 @@ while :; do
 	mtag=$( f_dialog_menutag )
 	f_dprintf "retval=$retval mtag=[$mtag]"
 
-	[ $retval -eq 0 ] || f_die
+	if [ $retval -eq 2 ]; then
+		# The Help button was pressed
+		f_show_help "$USERMGMT_HELPFILE"
+		continue
+	elif [ $retval -ne $SUCCESS ]; then
+		f_die
+	fi
 
 	case "$mtag" in
 	X) # Exit



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210260320.q9Q3K4xQ010154>