Category O/S

Export All Users from OU

How can you export all users from an OU in active directory on server 2003? Create a file called exportusers.vbs and paste in this text: Dim ObjWb Dim zz Set objRoot = GetObject(“LDAP://RootDSE”) strDNC = objRoot.Get(“DefaultNamingContext”) Set objDomain = GetObject(“LDAP://”…

ossec clear database

To delete all currently stored alerts and related data in the ossec database execute these commands in MySQL Editor: truncate table alert; truncate table data; Bash Script: #!/usr/local/bin/bash # #Stop ossec, remove old alerts, start ossec echo “stopping ossec” /var/ossec/bin/ossec-control…

netstat pid mac

having trouble identifying the pid using netstat on a mac? Try this instead: # sudo lsof -i -P This will list all open files and the current socket they are using and the actual port (using an integer).