At 12:24 PM 9/8/2003 -0500, Benjamin J. Weiss wrote:
> Is there something I am missing here that would allow me to user useradd
> and have it automatically set the new users home directory to 755 so that
> it can be used by the web server without having to go back and chmod the
> directory?  I am using RedHat 9.0 and this would be done from the command
> line, not Gnome.

The command that you're looking for is umask.  Check the man pages, the
command is a bit backwards, from my way of thinking.

You'll probably change the setting in /etc/bashrc.


Thanks Ben. Can anybody explain to me where in the /etc/bashrc to put it? man umask doesn't tell me squat about that (or I haven't found that yet). I put it in the /etc/bashrc file. Also in my /root/.bashrc file, logged out, logged in as root, did a 'useradd asdf' and the asdf directory was created with permissions of 700. So apparently, if it is suppose to go into /etc/bashrc, it must need to go in at a specific point in there. I now have this at the top of my /etc/bashrc file:

# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
        umask 022
else
        umask 022
fi
umask 022


Thanks Steve



--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to