Thursday, March 12, 2020

When did each /var/log/messages file start logging ?

Getting an idea of when each /var/log/messages file, compressed or not, first started. Printing the first line of each file.

for logfile in /var/log/messages*
do  
   if [[ $logfile == *.bz2 ]]
   then 
      echo -ne "$logfile\t" 
      bzcat $logfile | head -1 
   else
      echo -ne "$logfile\t"
      cat $logfile | head -1
   fi
done

Monday, March 19, 2018

Print snmp Engine ID on FreeBSD / statseeker Appliance

ssh into the system. Statseeker has a default account of statseeker. Password should be known to you:

You can run the following command to print the local Engine ID for snmpv3 so you can set up Informs from other systems to be sent to statseeker. e.g. VMware ESXi.

bsnmpwalk 1.3.6.1.6.3.10.2.1.1

Tuesday, October 08, 2013

Windows Update Failing with 80243004 - Weird, but fixed

All credit to Pete and his well crafted screenshot series solution:
http://www.petenetlive.com/KB/Article/0000643.htm

I had to "untick" the box he mentions, but the solution is both weird and bang on the money. I had noticed that my Taskbar had a lot of empty space in it, and when I moused over it, it shrank. I honestly thought it couldn't be related...I was wrong.

Monday, October 07, 2013

Google Drive + Group Permissions + New Users = FAIL!


Below is a question and response from Google's Enterprise Support regarding bad behaviour with Groups and Google Drive permissions.  The long and short of it is that if you are newly added to an existing Group, you won't be able to find any of the documents that that Group's members have access to.

You need to be sent the exact link to each of the documents. Being unable to browse the items you have been given access to, is a complete fail when it comes to a system of files and group based permissions.

Imagine if you had permissions to all the files in an SMB (Windows) Share, but when you opened the share, you could see nothing. Bad and Wrong it seems: ( http://www.catb.org/jargon/html/B/Bad-and-Wrong.html )

Google Apps users Beware...

-------------------------

Case: ########
Subject: Files shared to group don't appear

A series of folders/files were shared in Drive to a given group. I joined the organisation recently and was added to the group's membership.

The files do not appear in Drive, and nor can I search for them. If I am sent a link directly to the file, then I can work/access as normal. Even after accessing the file, it doesn't appear in my Drive.

If the group is removed from the file/folder and then readded, I can see the newly shared items. The issue it seems is that the enumeration is not taking place to members added to this group after it has been applied to an item previously.

Is this expected behaviour, or is something amiss?

Thanks,

----------------------

Thank you for your message and the information provided.
This is expected behavior for newly added users to a group.
However there are a few options I can offer you as a workaround.

1. You can search the file by opening advanced search and choose ‘Search domain.com’ at the bottom using the drop down arrow of the search box.
Once you find the file, it will appear under "All Items." Then you can simply move it to your Drive.
2. Access it by URL & the file/folder will appear under "All Items."
3. Change the sharing permission and then switch back to the original sharing permission.
4. And finally what you've already done - delete and re-add the group.

I hope this will be helpful. Please let me know if you have any other question and I'll be more than happy to answer.

Have a great day!

Kind regards,

#####
Google Enterprise Support

Wednesday, October 02, 2013

Windows Deployment Services and setting PXE to "Respond to all client computers (known and unknown)." gives Access Denied

Quick and dirty hints to fix this:

  1. Open ADSIEdit.msc , connect to the Default Domain.
  2. Browse to the Computer Account of the WDS Server. It will have a Child Object. The user that runs the WDS Console needs Full Access permissions to this Child Object. 
  3. Right click and choose properties. 
  4. Select the Security/Permissions tab and add the user/group in. Set them to have Full Permissions.
  5. Log out of the WDS Server and log back in again. 
  6. AD replication may delay the result of this, but you should now no longer have Access Denied.

Wednesday, May 22, 2013

Raspbian, CUPS, and Long Passwords

There is a strange phenomenon I encountered when attempting to add a local printer to our little Raspberry Pi's Raspbian GNU/Linux installation. In order to log in to the CUPS interface, by default a user must be a member of lpadmin to do all the bizzo in CUPS Administration. I added the user to this group, but could not log in to the web interface. It kept coming back as if I'd typed my password wrong.

Turns out that there is something in the authentication procedure, [could be the Midori browser, could be cupsd, could be something else,] that means you can't have a long password and successfully log in to the web interface of CUPS. By long, I mean something like 35 chars. It's a passphrase.

Have fun!

Thursday, November 22, 2012

SQL 2008 R2 - Specify Port Number

If you want to firewall your SQL 2008 R2 instance, you will need to specify a port number for it to listen on. If you don't, it will be a different port each time the instance is restarted. So any firewall rule specifying a port number will need to be changed. Not practical.

Microsofts instructions on how to change this are here...but they have missed quite an important step, based on the default configuration of SQL 2008 R2:
 http://msdn.microsoft.com/en-us/library/ms177440%28v=sql.105%29.aspx

In SQL Server Configuration Manager | SQL Server Network Configuration | Protocols for | TCP/IP (Properties) | Protocol (Tab)

You need to set the Listen All to No. Otherwise any changes you make on the IP Addresses tab will not take effect. Only the settings under IPAll in the IP Address tab will make any difference.

They also don't tell you what the Active and Enabled fields do on the IP Addresses tab. Click the help button and it will explain it. Basically Active is looking at the OS to see if the IP address is actually in use. Enabled is something you set, it decides if this IP Address will listen at all. Make sure you Set Enabled to Yes on the ones you want to listen on.