Date: Sat, 27 Dec 2003 01:05:38 -0600 (CST) From: William Michael Grim <wgrim@siue.edu> To: freebsd-hackers@freebsd.org Subject: Re: [Patch] : adduser - new functionality Message-ID: <Pine.SO4.4.05.10312270104190.8146-300000@cougar.isg.siue.edu> In-Reply-To: <Pine.SO4.4.05.10312270051440.7957-300000@cougar.isg.siue.edu>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Hey there!
I have included a patch to adduser that allows a user to change the
permissions with which adduser sets a new home directory. I made this
change because I ALWAYS forget to set up a default permission since most
variants of Unix already set it to 0751 for me.
I also included a diff of the man page for adduser that gives some
information about the change.
I tried testing this in as many possible ways as I could. I'd like to
think I did a good job, but only time can tell.
Should I send this patch somewhere else or not?
William Michael Grim
Student, Southern Illinois University at Edwardsville
Unix Network Administrator, SIUE, Computer Science dept.
Phone: (217) 341-6552
Email: wgrim@siue.edu
[-- Attachment #2 --]
85d84
< echo " -o home directory permissions (octal)"
155d153
< echo "mode=$mode" >> ${ADDUSERCONF}
274,276d271
<
< chmod $mode "$uhome";
< info "Set permissions of ($uhome) to $mode.";
390,404d384
< # get_mode
< # Reads an octal number (permissions) in an interactive session or batch
< # session. Sets the user's new home directory to these permissions.
< #
< get_mode() {
< _input=
<
< echo -n "Home directory permissions [$mode]: "
< read _input
<
< if [ -n "$_input" ]; then
< mode=$_input
< fi
< }
<
628d607
< get_mode
739d717
< printf "%-10s : %s\n" "Home Perms" "$mode"
805d782
< mode=0751
877,880d853
< ;;
< -o)
< mode="$2"
< shift; shift;
[-- Attachment #3 --]
48d47
< .Op Fl o Ar mode
117,121d115
< .It mode
< You may only use absolute or symbolic modes for home directory
< permissions; see
< .Xr chmod 1
< for more information.
285,288d278
< .It Fl o Ar mode
< Set the default permissions of a new home directory using modes
< specified in
< .Xr chmod 1 .
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SO4.4.05.10312270104190.8146-300000>
