Zabbix upgrade from 1.8 to 2.0

Here is a problem. I have old zabbix server 1.8.3 already upgraded from version 1.6. There are lot of corrupted entries so  Import/export does not work as expected. Database patching did not work as well. There are some changes so I wanted a workaround. So I created database copy and patched it first and then made export from that database.

Database upgrade

sudo ./upgrade -u root  -pyourpassword databasename –force

where database name is name of old database, attach database to the new server and then do some export.

 

 

 

Advertisements

vbs script to get users from excel and add parameter password never expires

Solutions in internet wont work for me

I  found reccomendations like

  1. intUAC = objUser.Get(“userAccountControl”)
  2. If ADS_UF_DONT_EXPIRE_PASSWD AND intUAC Then
  3.   Wscript.Echo “Already enabled”
  4. Else
  5.   objUser.Put “userAccountControl”, intUAC XOR _
  6.     ADS_UF_DONT_EXPIRE_PASSWD

dont know what is IntUAC I found there are numbering parameters for users object

512 – Enable Account

514 – Disable account

544 – Account Enabled – Require user to change password at first logon

66048 – Password never expires

262656 – Smart Card Logon Required

I found some script http://www.computerperformance.co.uk/vbscript/vbscript_user_spreadsheet.htm and remade it

add password never expires

So my script is >>>

http://faqwiki.blogspot.com/2012/03/vbs-to-import-users-from-excel-to.html

GPO to place an icon on all Desktops

As always I dont have easy tasks, this time I was asked to place an icon on Desktop, but we dont know who will og in, so GPO must be published in Computers part of GPO. In GPMC Scripts can be placed in 4 places, Startup, Shutdown , Logon and Logoff, unfortnately they wont work , as gpo was filtered by computernames, Startup script executes but placed icon on Default users Desktop, not current users. Current Desktop was not related to All users profile, maybe I did something wrong, it take about 6 hours to me including testing and finally I found 2 scripts and combined them in one, as wordpress does not like pictures, I posted it in blogspot.

http://faqwiki.blogspot.com/2012/02/startup-vbs-script-to-place-icon-on.html

Problems in Windows 2003 GPO application assignement

I am discussing about errors ID: 119 and ID: 308 in Windows 2003 application assignement using GPO.You assign application but it wont install. I will not repeat other howtos, just point out problems. Group policy accepts only msi files and adds some slipstreams himself. In my experience applications better be published in users gpo or must be assigned in computer gpo. First underwater stone is gpo “Always wait for a network”,

http://faqwiki.blogspot.com/2012/02/assign-application-via-windows-2003.html

x3550 8k-l missing RAID memeber

Yesterday I discovered red light on DASD error on my IBM x3550 rackmountable server. As this blog doesnot support embeded slideshows, I moved to blogspot. So the whole article is here >>>
http://faqwiki.blogspot.com/2012/01/ibm-x3550-raid-bios-8k-l-mirror-restore.html
Article is about how to get in bios, replace drive, restore RAID volume.

Windows Domain alias

I was searching for a weak, until I found solution. It is possible to log on with alternate logon name. At first I was looking in DNS properties, CNAME actually it is In the Active Directory Domains and Trusts root properties.

Domain alias in Domains and Trusts properties
After adding new suffix you can change it in the users profile.
Active Directory Change suffix
Then you can log in whether in default mode choosing domain name or using username@newsuffix
log on using domain alias
As you can see, suffix is one name, not the whole domainname.forestname.forstsuffix, that is very useful when you have multiple trusted domains and users don’t know where exactly to log on. I checked, it is not creating new profile, user’s SID is the same.

users in windows 2003 domain by LastLogon repadmin /showattr

I was searching to enumerate stale user records in http://blogs.technet.com/b/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx

Was full of errors and no finished, why should I search against all dc when they replicate? Buut it was good point to start to digg. Second I have no attribute lastLogontimeStamp but I have LastLogon. First I run query against my user and get all  object names

repadmin /showattr servername.domainname.com “CN=giors,ou=userou,DC=domainname,dc=com” /allvalues

If you put * in place of servername.domainname.com it is ok but not in place of “CN=giors,ou=userou,DC=domainname,dc=com” it definitely will not be ok. So the correct to get all users in some ou last logon name in Windows 2003R2 syntax is:

repadmin /showattr servername.domainname.com “ou=userou,DC=domainname,dc=com” /subtree /filter :”(&(objectCategory=Person)(objectClass=user))” /atts:LastLogon>userou.txt

File will be in your profile root. As far as I found users can be subtracted only by ou.