davidep
(Davide Principi)
October 28, 2016, 12:31pm
1
Let’s forgot about that strange /var/lib/nethserver/home
home directory path.
Do not break expectations . Let’s follow upstream settings. Come back /home
We can still bind-mount it, but …who would notice the change?
We have also a bug to fix, and it can be the right moment to do it in the right way:
NethServer Version: NS 7RC1
Module: Samba 4 AD
Hello:
I have same issue of Missing Samba home directory
I have joined a Windows 7 professional to NS7RC1 with Samba4, I have installed RSAT on Windows 7.
In “Active Directory Users and Computer” I have created a new user.
I logged in with that new user in windows 7.
I was expecting that home shared folder of the user was empty but the share points to the / of the server, so i see all the content of the server.
In /var/lib/nethserver/home …
What do you think?
4 Likes
davidep
(Davide Principi)
October 28, 2016, 12:39pm
2
In the past we decided to set it under /var, to simplify the deployment of a single-growing partition system. However home directories are seldom used, and today I’d prefer being more upstream-compliant and simplify possible migration paths to NethServer.
Edit: the single-growing partition idea is still valid with the current bind mount in /etc/fstab:
/var/lib/nethserver/home /home none defaults,bind 0 0
The only thing I’d change is the home directory path, as returned by the getent
system calls:
$ getent passwd davidep
davidep:*:5123:5333:Davide Principi:/home/davidep:/bin/bash
A dedicated /home partition would be supported seamlessly! The bind mount is not executed if /home is mounted elsewhere:
use strict;
use warnings;
my $lineExists = 0;
open (RD, "</etc/fstab") || die("Cannot open input file /etc/fstab: $!\n");
while (<RD>)
{
next if ($_ =~ /^#/);
my @line = split(/\s+/);
if ( defined($line[1]) && $line[1] eq '/home' ){
$lineExists = 1;
}
}
close(RD);
if (! $lineExists == 1){
open(my $fh, '>>', '/etc/fstab') or die ("Cannot open output file /etc/fstab: $!\n");
print $fh "/var/lib/nethserver/home\t/home\tnone\tdefaults,bind\t0 0\n";
close $fh;
exit system("/bin/mount /home");
3 Likes
robb
(Rob Bosch)
October 28, 2016, 6:38pm
3
I come from Ubuntu and I really had to search for home directories and samba shares.
If it isn’t too difficult to implement, I would say: yes please. It sure does come closer to my comfort zone.
But we must be aware what impact it will have for NethServer: Not only the local path changes, I can imagine something will change in paths for services like backup.
1 Like
mark_nl
(Mark Verlinde)
October 28, 2016, 7:39pm
4
Agree!! I One of the things of the DNA of *X is /home/user.
EddieA
(Eddie Atherton)
October 28, 2016, 7:40pm
5
Anything that traverses the the filesystem starting at / that doesn’t exclude mounted file-systems. They will see all the files and directories twice.
There are many articles on the differences between soft-linking directories and bind-mounting them.
Unfortunately both methods have their plus and minus points.
Cheers.
davidep:
What do you think?
How much does it cost? If it’s doable, yes please!
davidep
(Davide Principi)
November 3, 2016, 10:04am
7
If /home is mounted elsewhere we should bind mount it instead of /var/lib/nethserver/home (swap source/dest)
/home must be excluded from backups
alefattorini:
How much does it cost?
There are few things to change, but many other to test! Perhaps it’s too late to put it in ns7 Final…
Honestly we can postpone this enhancement. There’s no hurry!
1 Like
robb
(Rob Bosch)
November 3, 2016, 11:03am
8
Because? If all data is in /home then it must be backupped. Or is this because it is a link mount from "/var/lib/nethserver/home and already backedup from there?
davidep
(Davide Principi)
November 3, 2016, 11:05am
9
You said it! Anything under /var/lib/nethserver is in the backup by default!