From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 03:20:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B082A5F1; Fri, 26 Oct 2012 03:20:04 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98D318FC1C; Fri, 26 Oct 2012 03:20:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9Q3K4hB010159; Fri, 26 Oct 2012 03:20:04 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q3K4xQ010154; Fri, 26 Oct 2012 03:20:04 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260320.q9Q3K4xQ010154@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 03:20:04 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 03:20:04 -0000 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