Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: chrisj on April 25, 2009, 03:13:09 PM

Title: [solved] Home Directories
Post by: chrisj on April 25, 2009, 03:13:09 PM
Hi, I have been using SME as a home user for sometime now and for the first time I have installed SME server 7.4 (with some additional contribs) into my company and everything is working really well. I just have one slight problem which I hope someone can help me with. The users use Windows XP and are used to having their home directories mapped to H but SME maps them to Z by default. At the moment I change this back from z to h manually in samb.conf everytime I do a stop or start smb, reboot, reconfiguration or whatever. I could use net use to map the XP machines manually but I was wondering if there is a way of changing this permanently on the server.

Thanks in advance
Title: Re: Home Directories
Post by: mercyh on April 25, 2009, 03:40:20 PM
Look toward the bottom of this page:

http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter13#Workgroup

or for another approach look here:

http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter7#Setting_up_network_drives

This is managed by netlogon.bat and can be changed to any available unused drive letter. You can also set it to map other shares if you wish.

Title: Re: Home Directories
Post by: cactus on April 25, 2009, 04:33:10 PM
The users use Windows XP and are used to having their home directories mapped to H but SME maps them to Z by default. At the moment I change this back from z to h manually in samb.conf everytime I do a stop or start smb, reboot, reconfiguration or whatever. I could use net use to map the XP machines manually but I was wondering if there is a way of changing this permanently on the server.
Easy:
Code: [Select]
db configuration setprop smb LogonDrive H
signal-event workgroup-update
After that have your users logoff and logon again and the drive should be mapped to H: instead of Z:

Fixed db command
Title: Re: Home Directories
Post by: cactus on April 25, 2009, 04:36:53 PM
This is managed by netlogon.bat and can be changed to any available unused drive letter. You can also set it to map other shares if you wish.
No this is defined in the samba configuration file as the default netlogon.bat on SME Server has this option commented out on default and reads:
Code: [Select]
REM To set the time when clients logon to the domain:
REM net time \\servername /set /yes
REM
REM To map a home directory to drive h:
REM net use h: /home
Title: Re: Home Directories
Post by: mmccarn on April 25, 2009, 04:39:26 PM
If chrisj can get what he wants by editing smb.conf, he's probably changing the "logon drive" setting.  It looks as though this is controlled by a db variable: http://wiki.contribs.org/DB_Variables_Configuration#Samba_global_settings_.28smbd.29

If the manual change being made to smb.conf is to the "logon drive" parameter, this should fix it permanently:
Code: [Select]
config setprop smb LogonDrive H
signal-event ibay-modify

If you're changing something other than "logon drive", tell us exactly what you're changing and we can help you find the correct db variable to set or template fragment to customize.
Title: Re: Home Directories
Post by: cactus on April 25, 2009, 04:42:36 PM
If chrisj can get what he wants by editing smb.conf, he's probably changing the "logon drive" setting.  It looks as though this is controlled by a db variable: http://wiki.contribs.org/DB_Variables_Configuration#Samba_global_settings_.28smbd.29
Yep, like stated earlier already :-)
Title: Re: Home Directories
Post by: mercyh on April 25, 2009, 04:50:04 PM
Cactus and mmccarn,

Thanks for the correction.... :???: :???:
(never underestimate the advantage of a user forum)
 
I never caught the fact that it was commented out in netlogon.bat and I could not understand how he could get it to change by editing a .conf file.
Title: Re: Home Directories
Post by: chrisj on April 25, 2009, 06:09:40 PM
Guys

Thank you all for the advice. To answer mercyh's question, I was altering the smb.conf file in /etc/samba using Midnight Commander to alter the users Logon Drive. It seemed to work fine but I was guessing this was not the right way of doing it. Am I right to assume it should be:

db configuration setprop smb LogonDrive H
signal-event workgroup-update

As per Cactus's reply?

Title: Re: Home Directories
Post by: cactus on April 25, 2009, 06:12:02 PM
I right to assume it should be:

db configuration setprop smb LogonDrive H
signal-event workgroup-update

As per Cactus's reply?
Yes, as I was the one to suggest to (re-)add this patch to the code (http://bugs.contribs.org/show_bug.cgi?id=1155)
Title: Re: Home Directories
Post by: chrisj on April 25, 2009, 07:02:34 PM
Thanks Cactus, works like a dream!! Consider resolved!!

Chrisj