Author Topic: [SOLVED]Mapping file shares  (Read 5825 times)

expertgeeks

  • Forum Moderator
  • Zen Warrior
  • *****
  • Posts: 124
  • Karma: +11/-0
    • View Profile
Re: Mapping file shares
« Reply #15 on: March 04, 2012, 06:02:53 pm »
Open up a command window (WinKey+R, type cmd & hit enter) and try calling the scripts via that. See what errors you get when running the scripts, and why the vbscripts aren't running for you..
Code: [Select]
call \\servername\netlogon\logon.bat
call \\servername\netlogon\net_drives.vbs
call \\servername\netlogon\printers.vbs


ask2me007

  • Zen Apprentice
  • *
  • Posts: 32
  • Karma: +1/-0
    • View Profile
Re: Mapping file shares
« Reply #16 on: March 05, 2012, 08:03:59 am »
This is working when I run this from my local PC.
But when I login to the PC using PDC it didnt works at all.
This is the problem

expertgeeks

  • Forum Moderator
  • Zen Warrior
  • *****
  • Posts: 124
  • Karma: +11/-0
    • View Profile
Re: Mapping file shares
« Reply #17 on: March 05, 2012, 02:37:58 pm »
If you add a pause statement after 'echo off' at the top of zentyal-logon.bat, and login to the domain, do you see the paused command window ?

ask2me007

  • Zen Apprentice
  • *
  • Posts: 32
  • Karma: +1/-0
    • View Profile
Re: Mapping file shares
« Reply #18 on: March 06, 2012, 05:48:47 am »
I added pause statement before and after echo off.
But it didnt worked at all.
But when I tested from my localmachine using \\servername\netlogon\zentyal-logon.bat it worked.

the copy of the zentyal-logon.bat is as follows


pause
echo off
pause
set Win7=
set Win7.Major=6
set Win7.Minor=1

set Version=
for /f "skip=1" %%v in ('wmic os get version') do if not defined Version set Version=%%v
for /f "delims=. tokens=1-3" %%a in ("%Version%") do (
  set Version.Major=%%a
  set Version.Minor=%%b
  set Version.Build=%%c
)

set GEQ_W7=
if %Version.Major%==%Win7.Major% (
   if %Version.Minor% geq %Win7.Minor% set GEQ_W7=1
) else if %Version.Major% gtr %Win7.Major% set GEQ_W7=1

if defined GEQ_W7 (
  net use Z: \\server test\%USERNAME%
)


Shall I reinstall the Zentyal server again????
« Last Edit: March 06, 2012, 11:55:18 am by ask2me007 »

ask2me007

  • Zen Apprentice
  • *
  • Posts: 32
  • Karma: +1/-0
    • View Profile
Re: Mapping file shares
« Reply #19 on: March 07, 2012, 10:05:49 am »
Thanks everybody

The problem has been resolved.
I changed my netbios name and domain name and after that everything works fine.

Thanks for the support all of you have given.

robb

  • Guest
Re: Mapping file shares
« Reply #20 on: March 07, 2012, 10:55:03 am »
Good to see your problem has been solved. Can you mark in the TITLE of the first post that this has been [SOLVED]?

Can you explain why your domainname and netbiosname conflicted with executing the scripts?

ask2me007

  • Zen Apprentice
  • *
  • Posts: 32
  • Karma: +1/-0
    • View Profile
Re: Mapping file shares
« Reply #21 on: March 07, 2012, 02:42:15 pm »
Hi robb,
How can i change the status to solved?

I dont know what exactly happened. But samba is running in 3 servers in my network. Probably the netbios name or domain were same. Normally everybody will give names related to their firm. But I dont checked this as I dont have access to that servers.

robb

  • Guest
Re: [SOLVED]Mapping file shares
« Reply #22 on: March 07, 2012, 03:30:25 pm »
I marked the title as [SOLVED] for you.
You can just edit the title.