Re: home directory permission
Peter Samek <samek@upc.uniba.sk> writes:
> On Fri, Nov 30, 2001 at 12:22:34PM -0300, teste teste1 wrote:
> >
> > Howto modify permission when create a new user, I
> > do not want to change the permissions all time that to
> > add a new user.
> >
> >
> > Default Permission
> > drwxr-sr-x 2 teste2 teste2 teste2
> >
> > best security permission
> > drwx------ 2 teste teste teste
>
> You can create a script file /usr/local/sbin/adduser.local.
> This file will be called after a new user is created.
>
> In my "adduser.local" file I have something like:
>
> L_HOMEDIR=$4
> echo Changing the file permissions on "$L_HOMEDIR".
> if [ -d "$L_HOMEDIR" ]; then chmod o-r "$L_HOMEDIR"; fi
> #EOF
>
> More in "man adduser".
>
> Of course it works only if you use "adduser" command.
Or if using woody or sid, change DIR_MODE in /etc/adduser.conf.
Phil.
Reply to: