Koozali.org: home of the SME Server

Possible to disable user's home folder share?

Offline n9yty

  • *
  • 16
  • +0/-0
Possible to disable user's home folder share?
« on: September 04, 2014, 02:45:21 AM »
Is it possible to disable the ability of a user to mount/use their home directory share and only allow them to use the i-bays?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Possible to disable user's home folder share?
« Reply #1 on: September 04, 2014, 10:23:46 AM »
I would answer with a question; why? (i.e., please explain your problem and not your solution)

in any case, this shoud work (not tested):

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/smb.conf
cd /etc/e-smith/templates-custom/etc/smb.conf
echo "# users' home dir disabled" > 50homes
signal-event ibay-modify

the last line will re-generate smb.conf and restart samba

let us know

Offline n9yty

  • *
  • 16
  • +0/-0
Re: Possible to disable user's home folder share?
« Reply #2 on: September 04, 2014, 03:23:10 PM »
I would answer with a question; why? (i.e., please explain your problem and not your solution)
Stefano,

I appreciate your approach, because I know you want to be sure you are solving problems and not providing misguided solutions. I see that often, and I know sometimes people are affronted by the question and think "Just tell me what I want to know."  Well, sometimes we don't know what we need to know. :)

In this case, there is a user who needs to have access to the server to upload and store files, but we can not have them putting things on there in a location not visible to everyone else. It is truly a groupshare only type of scenario. We noticed a lot of space disappearing on the server only to find out they had somehow turned on Windows Backup or Previous Files or whatever they are calling it now, and they had not only uploaded some 250GB to the public i-bay share, but they had over 500GB in their home folder for which nobody could see. I was called in to find out where all the missing space was because they were running out and couldn't find the files.

I am going to work with them and advise that the file server is not appropriate for this function, they should have a portable USB drive on their laptop for the Windows backup feature, and that only truly shared items need to go on the file server. And even then, if something is truly archival in that you expect to never use it again, you might find a better way to do that rather than leave it on the server.

The reason for the more brute force approach to wanting to shut off his access to the home share is that very often policy simply can not be followed by some people, and I have no authority over them to force or even strongly encourage compliance, so the only recourse is to be sure it can't be done in the first place.

Knowing that there is nothing in the GUI to do this, I will look into the Samba configuration options.

Thanks,
  Steve

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Possible to disable user's home folder share?
« Reply #3 on: September 05, 2014, 04:06:52 AM »
n9yty

Try installing webshare in an ibay & add the user to webshare (not as a sme server standard user). See howto.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Possible to disable user's home folder share?
« Reply #4 on: September 05, 2014, 12:13:27 PM »
Janet.. I think OP's point of view is clear enough..

home dir can be filled with junk by user and nobody knows it until server resources are finished..

I think that in some cases admins must use the sword... :-)

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Possible to disable user's home folder share?
« Reply #5 on: September 05, 2014, 11:02:28 PM »
Stefano

I am not sure of the point you are making (I do understand OP's point(s) of view).

OP is still looking (by their own admission) for a way to control a user access to home folder.
The function of this user is to upload files to a server groupshare.
If Webshare is utilised, & the user is not added as a standard sme user, they will not have access to a home folder.
Webshare will allow them to upload files to the groupshare (as a webshare user rather than a sme user).
It seems to fit OP's requirements.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline hawk

  • *
  • 141
  • +0/-0
    • hawkelectronics
Re: Possible to disable user's home folder share?
« Reply #6 on: September 06, 2014, 06:23:24 AM »
this is a very interesting topic and one i battle with on a daily basis.
i use a different approach, instead of changing the server i control what the users backup to the server.
for example we only backup the desktop, documents and email, we do not backup the music or video folders.
or other specifc folders. 
There is a bit of user education needed but once they understand then all runs smoothly.
i also use the quota system so each user can only backup their allocated space of data.

thanks
john