Koozali.org: home of the SME Server

no home drive :-(

stitch

no home drive :-(
« on: February 16, 2002, 10:41:41 AM »
folks,

I running SME v512 and a w2k client and I cannot map a h: drive to my home drive. I am using a simple "net use h: /home" command but netlogon.bat reports:

The users home directory has not been specified.

More help is available by typing NET HELPMSG 3916

Any ideas?

Thanks,
stitch

Tyrone Miles

Re: no home drive :-(
« Reply #1 on: February 17, 2002, 03:03:37 AM »
Net use h: /home command ONLY works of 95, 98 and ME machines.  

I know in a real windows NT domain you only use the NET USE H: /HOME statement for non NT computers. Because NT pulls that info from the domain database. In an NT domain you instead of putting NET USE H: /HOME in your script for NT machines you add in in user manager in the user account under profile. It gives you a choice under the option Home Directory ether Local Path or Connect "Drive letter" to \server\homedir$ NT, 2000 and XP pro machines know to pull from that. 95, 98, ME machines don't and need the NET USE H: /HOME statement to tell them to get the info from domain user database.

What I wound up doing is making a custom template for my logon script then using %U.bat as my script (which allows you to make a different logon script for each user using their logon name as the script name in caps.)
Then you can just map h: to the users home dir.

Here is the script I am using, the top part is for 95, 98 and ME machines. The bottom for NT, 2K and XP machines.

TMILES.bat :

if "%OS%" == "Windows_NT" goto NT_OS

net use h : /home
net use s: \server\dir

goto time

:NT_OS
net use h: \server\tmiles /persistent:no
net use s : \server\dir /persistent:no

:time
net time \server /set /yes

:end



The time command works for me with my XP pro machine no problem, and I know the if "%OS% == statement works fine in an NT domain using NT, 2000 and XP pro machines and seems to work fine with samba. The persistent statement causes NT machines to drop the drives that they have mapped after each reboot. If you don't use it everytime you run the script you will get an error saying the resource is all ready in use.

Anyway I hope this helps.

Des Dougan

Re: no home drive :-(
« Reply #2 on: February 17, 2002, 06:02:51 AM »
Tyrone Miles wrote:
>
> Net use h: /home command ONLY works of 95, 98 and ME
> machines.
>
This is _not_ true. The "net use h: /home" command works perfectly for Win 2K systems (I have two on my LAN).

I have pasted a sample NETLOGON.BAT file below. It requires a couple of other files and I hope to have it and the other files hosted by e-smith soon.

Des Dougan.

@echo off
REM
REM Enhanced version by Des Dougan (ddougan@telus.net), March 2001.
REM
REM Updated to add code to enable use on NT/W2K, November 2001.
REM
REM Updated to fix some errors in the code to enable use on NT/W2K.
REM These caused some problems on Win 9x systems. February 2002.
REM
REM **Windows 9x/ME systems**
REM This enhanced "netlogon.bat" script uses "winset" (an MS
REM utility which is on the Win95 CD (not sure about 98 or ME). It
REM loads environment variables extracted by "putinenv".
REM "putinenv" is a freeware utility used to read samba system variables.
REM Note: it does not pull all the variables noted in its online help
REM presumably because samba does not support all the MS LAN Manager
REM variables this was written to extract.
REM
REM **NT/Win 2000**
REM NT and W2K don't need, and can't use, "winset". Code included to
REM bypass the Win9x required stuff.
REM
REM Main code starts here
REM
REM Set the temporarily-mapped directory containing the scripts.
Z:\
REM Define the name of the server this batch file runs from. Server
REM name is in "\servername" format.
REM
set SERVER=\servername
REM
REM Set the workstation time when clients logon to the domain.
REM
net time %SERVER% /set /yes
REM
REM Map the user's home directory to drive H:
net use h: /home /yes
REM
REM Map the images shared directory tree to drive i:
net use i: %SERVER%\images /yes
REM
REM Bypass Win9x-specific section if NT/W2K (NT & W2K have a "boot.ini"
REM file, which Win9x doesn't have).
REM
if exist c:\boot.ini goto :NOT9X
REM
REM For Win9x clients, define the name of the server this batch file
REM runs from as a global ("winset") environment variable. Server
REM name is in "\servername" format.
REM
winset SERVER=\servername
REM
REM Run the putinenv utility to extract variables
REM Run "putinenv | more" for help
REM
putinenv.exe L /L
REM
REM Set the USERNAME environment variable
REM
winset USERNAME=%USERNAME%
REM
REM Set COMPUTERNAME if required
REM winset COMPUTERNAME=%COMPUTERNAME%
REM
:NOT9X
REM
REM Set shares based on who's logging in
if "%USERNAME%"=="des" net use q: %SERVER%\quicken /yes
REM
REM Set the directory back to C:\
REM
C:\
REM
REM Delete Z:\ mapping (left behind by NT and Win 2K)
REM
net use z: /delete /yes

Tyrone Miles

Re: no home drive :-(
« Reply #3 on: February 17, 2002, 06:42:50 AM »
? Seems like a lot of work to me, especially if you have a lot of users? Just seems kind of convoluted for something as simple as mapping a couple of drives?  

Have you tried it on an e-smith server yet? And does it require files on the client machines? (I see some ini’s, exe’s etc that you seem to be pulling from. )

I mean will it work with an out the box e-smith configursation and an out the box 2k, NT or XP install? Or do I have to search down a 95 disk, find the freeware and load software etc?

See you say that the "net use h: /home" command does work and what I said was not true? But in reality out the box 2k, NT and XP do not use the "net use h: /home" command. You have to tweak your systems or your servers to get this to work when you can very simply make a script like the one I wrote above, no extra files no how-to's, no pulling from different scripts.  Out the box.  LOL!

Matthew

Re: no home drive :-(
« Reply #4 on: February 17, 2002, 10:44:56 PM »
I am having the same problem, but on all the  computers on the network (only 3 actually.)  One with Windows Me, another 2 with win95.  I have the server set up as a gateway with the external connection being our school network.  Everything works fine except mapping the home drive.  

At school I set up a server with SME V 5.1 and every thing in the logon scrip seems to work fine except mapping the home drive with the following command:
NET USE H: /HOME
and it responds:
Error 67: The specified shared directory cannot be found. Make sure you have
specified the network name correctly. If the problem persists, contact your
network administrator.


I am thinking it might be a bug in the server
At home I set up a server with verion 4.1 and I was able to make a logon script to map a home directory with out any problems using the following command:
NET USE H: /HOME
 The computers on this network have win95(2) and win 98(3) and of course e-smith server and gateway.  

any suggestions.  I would like to keep it simple and use only one logon script for everyone.

stitch

Re: no home drive :-(
« Reply #5 on: February 17, 2002, 11:11:44 PM »
the funny thing is that the "net use h: /home" worked for my SME v5/W2K setup but not for my SMEv512/W2K setup!?

stitch

Re: no home drive :-(
« Reply #6 on: February 18, 2002, 09:42:47 AM »
after much soul searching I decided to turn on roaming profiles and voila! home drive city :-D

Matthew

Re: no home drive :-(turning on roaming profiles works:-)
« Reply #7 on: February 19, 2002, 04:25:25 AM »
now one question that may sound a little bit silly.  What are roaming profiles.  I think I have a general Idea but would like clarification.  I am not noticing any difference.

Tyrone Miles

Re: no home drive :-(turning on roaming profiles works:-)
« Reply #8 on: February 19, 2002, 05:35:02 AM »
Roaming profiles are supposed to allow your settings etc to follow you from client to client by pulling your desktop , login and other info down to the client from the servers.

When it works it’s really cool because whatever machine you go to you will get your same desktop etc.

Matthew

Re: no home drive :-(turning on roaming profiles works:-)
« Reply #9 on: February 19, 2002, 05:57:07 AM »
Thats what i thougt they were.  but what operating systems are they commpatable with?

Tyrone Miles

Re: no home drive :-(turning on roaming profiles works:-)
« Reply #10 on: February 19, 2002, 06:53:09 AM »
You can configure 95, 98, and ME to use them by using the policy editor. 2k and XP should know that it's turned on and change from using local profiles to using roaming ones.

stitch

Re: no home drive :-(turning on roaming profiles works:-)
« Reply #11 on: February 19, 2002, 07:14:03 AM »
Matt,

the only thing that's uncool about roaming profiles is users with large profiles moving to remote sites on the end of slow WAN links. A large profile might be caused from a large file on the desktop, say.

Tyrone Miles

Re: no home drive :-(turning on roaming profiles works:-)
« Reply #12 on: February 19, 2002, 07:44:41 AM »
Yes, it took me almost an hour to log off after I turned on roaming profiles the first time. Because my profile on my XP machine was 2.2 GB. And if you have a lot of users on your network with large profiles I hope you have a lot of drive space on your server.