The file that you need to modify is
/etc/e-smith/events/actions/user-create-profiledir
I modified it enough that it automatically create the user.V2 profile directory, but the needed permissions are not applied. Can anybody perhaps modify it further?
EDIT: I might have just seen the problem after posting. Will test it now.
EDIT2: My hunch did not work, can somebody else jump in?
Here it is:
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# snip
#----------------------------------------------------------------------
package esmith;
use strict;
use Errno;
use esmith::util;
use esmith::AccountsDB;
my $adb = esmith::AccountsDB->open_ro();
my $event = $ARGV ;
my @users = ('admin', map { $_->key } $adb->users);
my @newusers = ($event eq "post-upgrade") ? @users : $ARGV[1] ;
foreach my $user ( @newusers )
{
die "$user is not a user account "
unless ( grep /^$user$/, @users );
my $dir = "/home/e-smith/files/samba/profiles/$user";
my $V2dir = "/home/e-smith/files/samba/profiles/$user.V2";
my $pre_existing = ( -d $dir );
my $V2pre_existing = ( -d $newdir );
$pre_existing || mkdir $dir, 700 || die "Couldn't create directory $dir ";
$V2pre_existing || mkdir $V2dir, 700 || die "Couldn't create directory $V2dir ";
chmod 0700, $dir; # Remove setgid bit
# chmod 0700, $V2dir; (doesn't work)
next if $pre_existing;
esmith::util::chownFile($user, $user, $dir) ||
die "Couldn't change ownership of $dir ";
chmod 0700, $V2dir;
next if $V2pre_existing;
esmith::util::chownFile($user, $user, $V2dir) ||
die "Couldn't change ownership of $V2dir ";
}
exit (0);
Craig