ocslogon /tag parameter

Bug #802625 reported by yeye5678 on 2011-06-27
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OCS Inventory: Windows Agent
Medium
Didier Liroulet

Bug Description

When i specify ocslogon /TAG="new-tag" - new computers are visible with NA on the database.

packager parameters: /S /SERVER=https://my_server/ocsinventory /PNUM=4343 /DEBUG=2 /NOSPLASH /NO_SYSTRAY /NOW

ocslogon parameters: ocslogon.exe /PACKAGER /GPO /DEPLOY=2.0.0.21 /TAG="new-tag"

i try it with ocslogon.exe 2.0.2 and agent 2.0.0.22 and 2.0.0.23, i have the same issue.

best regards

it works with ocslogon and 4061 agent
 > Date: Mon, 27 Jun 2011 16:32:12 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 802625] Re: ocslogon /tag parameter
>
> Hi,
>
> I check the documentation for deployment with OcsLogon here http://wiki.ocsinventory-ng.org/index.php/Documentation:WindowsAgent#Deploying_Agent_using_launcher_OcsLogon.exe_through_Login_Script_or_Active_Directory_GPO. and I don't see that /TAG is a valid command line option.
> /TAG is a command line option for Agent.
> See http://wiki.ocsinventory-ng.org/index.php/Documentation:WindowsAgent#OCS_Inventory_NG_Agent_for_Windows__Setup_command_line_options
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/802625
>
> Title:
> ocslogon /tag parameter
>
> Status in OCS Inventory NG Agent for Windows:
> New
>
> Bug description:
> When i specify ocslogon /TAG="new-tag" - new computers are visible with NA on the database.
>
> packager parameters: /S /SERVER=https://my_server/ocsinventory /PNUM=4343 /DEBUG=2 /NOSPLASH /NO_SYSTRAY /NOW
>
> ocslogon parameters: ocslogon.exe /PACKAGER /GPO /DEPLOY=2.0.0.21 /TAG="new-tag"
>
> i try it with ocslogon.exe 2.0.2 and agent 2.0.0.22 and 2.0.0.23, i
> have the same issue.
>
> best regards
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ocsinventory-windows-agent/+bug/802625/+subscriptions

Didier Liroulet (dliroulet) wrote :

Hy yeye5678.

I've found the problem.

It appears when you install a new agent specifying TAG in the command, but without using /NOW parameter.

In the case, all config is written except TAG value, because agent end before executing the code :(

Version 2.0.0.24 fix this.

https://bugs.launchpad.net/ocsinventory-windows-agent/+bug/754410/+attachment/2206211/+files/OCSNG-Windows-Agent-2.0.0.24.zip

Could you please chek if the problem is solved for you ?

Cheers

Changed in ocsinventory-windows-agent:
assignee: nobody → Didier Liroulet (dliroulet)
importance: Undecided → Medium
status: New → Fix Committed
mike (mickythekiller) wrote :
Download full text (4.5 KiB)

Même soucis mais avec le commutateur now

mon tag n'est pas pris en compte
il n'est pas écrit dans admininfo.conf

ocspackage.log

ocspackage.exe_:_********************************************************
ocspackage.exe_:_Starting Ocspackager on 05/08/2011 at 9:34:12
ocspackage.exe_:_Contents: OCS-NG-Windows-Agent-Setup.exe v2.0.0.20
ocspackage.exe_:_Temp dir: C:\DOCUME~1\DRRAOU~1\LOCALS~1\Temp\nsx4056.tmp\
ocspackage.exe_:_Parameters value is overloaded with: /TAG:/TAG:Dr_DUPONT_Toto
ocspackage.exe_:_Parameters: /TAG:Dr_DUPONT_Toto /S /DEBUG /NP /INSTALL /SERVER=http://ocs-xxx.fr:27015/ocsinventory /NOW /NOSPLASH /NO_SYSTRAY
ocspackage.exe_:_Install folder: C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent
ocspackage.exe_:_Certificate: C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\cacert.pem
ocspackage.exe_:_File collection:
ocspackage.exe_:_Testing current user IsUserAdmin:
ocspackage.exe_:_User= "Dr Toto DUPONT" AccountType= "Admin" IsUserAdmin= "true"
ocspackage.exe_:_User is Admin:
ocspackage.exe_:_Launching setup directly...
instocs.exe_:_Attempt to create "C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent" dir...
instocs.exe_:_Copying certificate:cacert.pem to "C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\"...
instocs.exe_:_Lauching OcsSetup.exe (see Contents)...
instocs.exe_:_============== Start of OcsSetup.exe log =============
********************************************************
Starting OCS Inventory NG Agent 2.0.0.20 setup on 05/08/2011 at 9:34:17
Checking if setup not already running...OK.
Checking Operating System...OK, Windows 2000 or higher.
Command line is: "C:\DOCUME~1\DRRAOU~1\LOCALS~1\Temp\nsx4056.tmp\OcsSetup.exe" /TAG:Dr_DUPONT_Toto /S /DEBUG /NP /INSTALL /SERVER=http://ocs-xxx.fr:27015/ocsinventory /NOW /NOSPLASH /NO_SYSTRAY
Parsing command line arguments...OK.
Checking for silent mode...Enabled.
Checking for splash screen...Disabled.
Checking if logged in user has Administrator privileges...OK.
Creating directory <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent>...
SetACL allowing Users / Power users read/write permissions on <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent>...Result: 0
SetACL removing inherited permissions on <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\Download>...Result: 0
SetACL allowing System and Administrators full permissions on <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\Download>...Result: 0
SetACL allowing Users / Power Users read only permissions on <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\Download>...Result: 0
Trying to determine if service was previously installed...No.
Trying to stop service and kill processes...
Trying to kill process OcsSystray.exe...Result: 603
Trying to kill process OcsService.exe...Result: 603
Trying to kill process OCSInventory.exe...Result: 603
Trying to kill process download.exe...Result: 603
Trying to kill process inst32.exe...Result: 603
Waiting 10 seconds for processes to terminate...
Co...

Read more...

mike (mickythekiller) wrote :

i've just tried with 2.0.0.24 and that's not better

mike (mickythekiller) on 2011-08-17
Changed in ocsinventory-windows-agent:
status: Fix Committed → In Progress
status: In Progress → Fix Committed
Didier Liroulet (dliroulet) wrote :

OK mike, searched a lot of time, and then, i see /TAG: ...

use "/TAG=" and not "/TAG:" if you want the /TAG parameter to be interpreted.

In 2.0 agent, each setup parameter value must be specified using /PARAM= and no more using /PARAM:

This bug is still resolved.

Cheers

Changed in ocsinventory-windows-agent:
status: Fix Committed → Fix Released
mike (mickythekiller) wrote :

Where can i download the 2.0.2 please ?

Didier Liroulet (dliroulet) wrote :

Hi.

Simply use the lastest 2.0.1 release.

Cheers

Didier Liroulet (dliroulet) wrote :

The 2.0.1.0 = 2.0.1 version is posterior to version 2.0.0.2

Jerome Charaoui (jcharaoui) wrote :

Using OcsLogon.exe version 2.0.0.2, the /TAG=SOMETAG parameter is ignored.

This is a regression from older versions, it used to work just fine.

The reason we need this is that we set the launch OcsLogon.exe though a GPO script with the proper tag a command-line parameter.

PascalC (p92) wrote :

same with 2.0.0.5

PascalC (p92) wrote :

i meant same with 2.0.5.0 - /tag="toto" parameter is not taken into account whether I use /now or not in the ocslogon parameters.

Didier Liroulet (dliroulet) wrote :

Hi,

There is an OcsLogon.log file into user's temp directory.

Could you please paste it here ?

Are you also using OCS Packager ?

Regards

Changed in ocsinventory-windows-agent:
status: Fix Released → In Progress
Didier Liroulet (dliroulet) wrote :

Hello Pascal,

I've already tested logon tool 2.0.2.0 and 2.1.0.1 on my platform, and it really apply /TAG="my tag" parameter.

However, if you've already inventoried the computer before, TAG modification is not applied on server, because Server is always the reference. TAG is applied from client computer only on the first inventory run, except allowing client TAG control on communication server configuration file.

Also, are you using OcsPackager with OcsLogon ?

Regards

Changed in ocsinventory-windows-agent:
status: In Progress → Fix Released
PascalC (p92) wrote :

Hey thanks for the answers.

Yes the computers are already registered in the ocs server by a previous version of ocs agent, with another tag or no tag. I thought I could overwrite this tag while running the latest version of the ocs agent on the client computers.
I did not see the option for overwriting the tag by the agent in the ocs server's options. I'll have to check this.

I use a GPO script to deploy ocs agent and run it. It uses ocslogon.exe to fetch ocs agent from the ocs server. I don't use ocspackage.

When I run the script directly on a server I can find the ocslogon.log on the server, but when the gpo runs it on a computer i am unable to find it on this computer disks.

The gpo script is run at station startup and is the following :

@echo off
echo startocs > "%USERPROFILE%\debug.txt"

echo %COMPUTERNAME% | find /i "SRV"
if %ERRORLEVEL% EQU 0 goto isserver

echo %COMPUTERNAME% | find /i "SERV"
if %ERRORLEVEL% EQU 0 goto isserver

:isltst
echo uinstocs >> "%USERPROFILE%\debug.txt"
ocslogon.exe /UNINSTALL /S /NOSPLASH /DEBUG=2 >> "%USERPROFILE%\debug.txt"
echo instocs >> "%USERPROFILE%\debug.txt"
ocslogon.exe /DEPLOY=2.0.5.0 /S /NOSPLASH /NO_SYSTRAY /TAG="mytag" /DEBUG=2 /NOW >> "%USERPROFILE%\debug.txt"

goto fin

:isserver
echo instocssrv >> "%USERPROFILE%\debug.txt"
ocslogon.exe /DEPLOY=2.0.5.0 /S /NOSPLASH /TAG="mytag2" /DEBUG=2 /NOW >> "%USERPROFILE%\debug.txt"

:fin
echo endocs >> "%USERPROFILE%\debug.txt"

Didier Liroulet (dliroulet) wrote :

Hi,

You must set OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT to 1 into apache config file ocsinventory-server.conf, then restart apache to enable changes.

When running a system GPO, OcsLogon produce a log into C:\windows\Temp directory, or in a sub directory of this directory.

When running a user GPO, OcsLogon produce a log into user's Temp directory, or in a sub directory of this directory.

Regards

PascalC (p92) wrote :

very usefull infos, thanks - i'll try that

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers