Koozali.org: home of the SME Server

netlogon.bat problem

Offline jvels

  • ***
  • 130
  • +0/-0
    • http://vels.dk
netlogon.bat problem
« on: July 11, 2006, 05:12:29 PM »
Hi

I have setup a SME 7 as domain controller.

I can logon the domain and get a Z drive in My computer.

I would like to make some groups drive.

I have /home/e-smith/files/samba/netlogon/netlogon.bat

net time \\velsserver /set /yes

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

#ifg book
net use m: \\velsserver\book_share\files
#endif

I have made a group call "book" and a ibay "book_share"


I read something about #ifg in SME so I install:
http://mirror.contribs.org/smeserver/contribs/jbennett/sme7/loginscript/RPM/

But when I login, with a user there are member of the group, the user see the ibay book_share, but not go direct to files???

When I login with a user there are not member of the group, this user see also the share in my computer but when I try to go to files i got error i have not rights...


1. How can I get it to work, so only users of the group see the drive in my computer?
2. Is it not possibel to make a share direct to the ibay_name\files  ?

Best Regrads
Jesper Vels

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
netlogon.bat problem
« Reply #1 on: July 11, 2006, 06:44:07 PM »
Quote

#ifg book
net use m: \\velsserver\book_share\files
#endif


I think this must change to:
Quote

#ifg book
net use m: \\velsserver\book_share
#endif


Note that I took off "\files" from net use line.
I don´t think it´s possible to map to more tha share level.
If you don´t need web access, turn it off on server-manager  and files will be the only option available and drive M will show content of files!

Jáder
...

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #2 on: July 12, 2006, 12:33:56 AM »
jvels

Do not change the netlogon.bat in /home/e-smith/files/samba/netlogon/ if you have installed the netlogon rpm.

It will modify the bat file etc for you.

My logon.bat looks like this:

Quote

@REM #------------------------------------------------------------
@REM # DO NOT MODIFY THIS FILE! It is updated automatically by the
@REM # e-smith server and gateway software. Instead, modify the source
@REM # template in the /etc/e-smith/templates-custom directory. For more
@REM # information, see http://www.e-smith.org.
@REM #------------------------------------------------------------
@ECHO OFF

REM ******************************************************
REM ** Mapping a drive to the home folder triggers the  **
REM ** generation of the login script.  Windows NT/2K   **
REM ** does this automatically but we need to map the   **
REM ** drive manually for the others.                   **
REM ******************************************************

IF "%OS%"=="Windows_NT" GOTO :SkipHomeMapping
NET USE h: /home
:SkipHomeMapping


REM Call the generated login script from the user's home folder:

CALL h:\netlogon.bat

@REM #------------------------------------------------------------
@REM # TEMPLATE END
@REM #------------------------------------------------------------



@ECHO OFF
ECHO Welcome to the Cooltemp Network
ECHO -----------------------------------
ECHO.


And my netlogon.template file looks like this ... this is modified through the web interface in server-manager:

Quote

#ifg server
REM Map Serverbay iBay for testing group:
NET USE G: \\server5\serverbay
#endif

#ifg test
REM Map share iBay for share group:
NET USE S: \\server5\share
#endif


Initially you will have to login a second time before this takes effect.

Also it's a good idea to disconnect all your shares in windows so that the bat file does the connections for you.

Each user will end up with a personal logon.bat file in there home dir that connects there drives depending on there group rights.

If you require a more in-depth explanation let me know.


Regards,

Tib

Offline jvels

  • ***
  • 130
  • +0/-0
    • http://vels.dk
netlogon.bat problem
« Reply #3 on: July 12, 2006, 09:04:02 AM »
Quote from: "Tib"
jvels

Do not change the netlogon.bat in /home/e-smith/files/samba/netlogon/ if you have installed the netlogon rpm.

It will modify the bat file etc for you.


Is there a way "back" when I have edit in my netlogon.bat?
Because I have tryed to reinstall the rpm and reboot the server, but i still do not have a netlogon like yours

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #4 on: July 12, 2006, 09:16:01 AM »
jvels

Use winscp to enter your server ... go the the netlogon.bat in /home/e-smith/files/samba/netlogon/ and edit it ... then just copy and paste what I put here and change the Welcom to etc to your requirements.

Then use the server-manager to change the requirements.

There is probable a diff way to do this as well but this is a quick fix.

Maybe even use the panel in server manager to change what you require and do a save ... I'm sure that should change it as well ... but only put in your part of the bat setup ... not the first bit I posted.

Rgerads,

Tib.

Offline jvels

  • ***
  • 130
  • +0/-0
    • http://vels.dk
netlogon.bat problem
« Reply #5 on: July 12, 2006, 12:21:22 PM »
Quote from: "Tib"
jvels

Use winscp to enter your server ... go the the netlogon.bat in /home/e-smith/files/samba/netlogon/ and edit it ... then just copy and paste what I put here and change the Welcom to etc to your requirements.

Then use the server-manager to change the requirements.

There is probable a diff way to do this as well but this is a quick fix.

Maybe even use the panel in server manager to change what you require and do a save ... I'm sure that should change it as well ... but only put in your part of the bat setup ... not the first bit I posted.

Rgerads,

Tib.


I have now install a fresh SME 7

Install the rpm.

Enabled the domain crontroller

createt the ibay,group and useres

i have not doing anything to the netlogon.bat

When I login to the domain with my XP pc i do not get any network drives in my computer??

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #6 on: July 12, 2006, 12:47:06 PM »
jvels

You may have to log out then in again ... I remember I had to do the 2 or 3 times for things to kick into gear.

You are loging onto the domain?

For the logon script to work you must logon to the domain.

Regards,

Tib

Offline jvels

  • ***
  • 130
  • +0/-0
    • http://vels.dk
netlogon.bat problem
« Reply #7 on: July 12, 2006, 12:50:31 PM »
Quote from: "Tib"
jvels

You may have to log out then in again ... I remember I had to do the 2 or 3 times for things to kick into gear.

You are loging onto the domain?

For the logon script to work you must logon to the domain.

Regards,

Tib


Hi

Yes im login on the domain

I see some template files in:
/etc/e-smith/templates/home/e-smith/files/samba/netlogon/netlogon.bat/

But the netlogon.bat in /home/e-smith/files/samba/netlogon/netlogon.bat  look like this:

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


Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #8 on: July 12, 2006, 12:52:51 PM »
jvels

Did you go into the server-manager and setup your shares etc .... then save your settings?


Regards,

Tib

Offline jvels

  • ***
  • 130
  • +0/-0
    • http://vels.dk
netlogon.bat problem
« Reply #9 on: July 12, 2006, 12:56:38 PM »
Quote from: "Tib"
jvels

Did you go into the server-manager and setup your shares etc .... then save your settings?


Regards,

Tib


yes

First i enable the domain, then i created the groups and users and ibays

i have Roaming profiles: No

can that be the problem?

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #10 on: July 12, 2006, 12:59:45 PM »
jvels

Go into your Login Script Manager tab and do something like:
Quote

@ECHO OFF

rem To set the time when clients logon to the domain:
net time \\e-smith /set /yes

#ifg general
rem Map share iBay for share and general groups:
NET USE S: \\e-smith\share
#endif

#ifg admins
rem Map updates ibay for general group:
NET USE U: \\e-smith\updates
#endif

#ifg ftpusr
rem Map updates ibay for general group:
NET USE V: \\e-smith\ftp_bay
#endif


Then save it.

Roaming profiles is no for me as well ... I found it a pain in the past.

It should all work ... I have it running on my PC here at home even.

Regards,

Tib

Offline jvels

  • ***
  • 130
  • +0/-0
    • http://vels.dk
netlogon.bat problem
« Reply #11 on: July 12, 2006, 01:01:40 PM »
Quote from: "Tib"
jvels

Go into your Login Script Manager tab and do something like:
Quote

@ECHO OFF

rem To set the time when clients logon to the domain:
net time \\e-smith /set /yes

#ifg general
rem Map share iBay for share and general groups:
NET USE S: \\e-smith\share
#endif

#ifg admins
rem Map updates ibay for general group:
NET USE U: \\e-smith\updates
#endif

#ifg ftpusr
rem Map updates ibay for general group:
NET USE V: \\e-smith\ftp_bay
#endif


Then save it.

Roaming profiles is no for me as well ... I found it a pain in the past.

It should all work ... I have it running on my PC here at home even.

Regards,

Tib


Login Script Manager tab ?

In my server-manger i do not have anything call that??

Code: [Select]
rpm -ihv http://mirror.contribs.org/smeserver/contribs/jbennett/sme7/loginscript/RPM/smeserver-loginscript-0.2-8.noarch.rpm
Retrieving http://mirror.contribs.org/smeserver/contribs/jbennett/sme7/loginscript/RPM/smeserver-loginscript-0.2-8.noarch.rpm
Preparing...                ########################################### [100%]
        package smeserver-loginscript-0.2-8 is already installed


As you see I have install it

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #12 on: July 12, 2006, 01:03:37 PM »
jvels

make sure you change: the \\e-smith to your server name and then your share name.

#ifg general
rem Map share iBay for share and general groups:
NET USE S: \\yourservername\yoursharename
#endif

Did you do a post update and a post reboot after you installed the rpm?

Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #13 on: July 12, 2006, 01:06:39 PM »
The proper comand is:

signal-event post-upgrade; signal-event reboot

It's a good idea to do that after rpm installs if your not sure.

Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
netlogon.bat problem
« Reply #14 on: July 12, 2006, 01:10:30 PM »
jvels

Quote

rpm -ihv http://mirror.contribs.org/smeserver/contribs/jbennett/sme7/loginscript/RPM/smeserver-loginscript-0.2-8.noarch.rpm


When you install I'm sure your supposed to use rpm -Uvh rpmname ... thats how I install most rpm's unless otherwise stated.

Regards,

Tib