[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: home directory permission

On Fri, Nov 30, 2001 at 12:22:34PM -0300, teste teste1 wrote:
> Hi all,
>     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
> Thanks,
> Ricardson


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:

echo Changing the file permissions on "$L_HOMEDIR".
if [ -d  "$L_HOMEDIR" ]; then chmod o-r "$L_HOMEDIR"; fi

More in "man adduser".

Of course it works only if you use "adduser" command.

 Peter Samek

Reply to: