Koozali.org: home of the SME Server

[solved] Home Directories

Offline chrisj

  • **
  • 27
  • +0/-0
[solved] Home Directories
« 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
« Last Edit: April 25, 2009, 07:10:54 PM by cactus »

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Home Directories
« Reply #1 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.

« Last Edit: April 25, 2009, 03:50:25 PM by mercyh »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Home Directories
« Reply #2 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
« Last Edit: April 25, 2009, 04:41:33 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Home Directories
« Reply #3 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
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Home Directories
« Reply #4 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.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Home Directories
« Reply #5 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 :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Home Directories
« Reply #6 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.
« Last Edit: April 25, 2009, 04:53:00 PM by mercyh »

Offline chrisj

  • **
  • 27
  • +0/-0
Re: Home Directories
« Reply #7 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?


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Home Directories
« Reply #8 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)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline chrisj

  • **
  • 27
  • +0/-0
Re: Home Directories
« Reply #9 on: April 25, 2009, 07:02:34 PM »
Thanks Cactus, works like a dream!! Consider resolved!!

Chrisj