General IT

Running BT Analogue Telephone Line via Structured CAT5e Network Cabling (RJ45)

posted 26 Oct 2016, 04:31 by Tristan Self

From time to time you need to run normal POTS telephone over structured cabling, the main issue is that in the UK the pin outs can be different from the rest of the world, so buying a BT plug to RJ45 cable doesn't always work.

Below is a diagram of the cabling pinouts required for the connection to work. In my configuration I've ignored the "bell" wire that is sometimes needed.

Also note that on the other side of the structured cabling (i.e. where you are connecting your phone) you must ensure that you have a modtap (balun) to convert from RJ45 back to the BT socket to plug your phone in. You'll need a PRIMARY (or MASTER) modtap here which has a ringing capacitor in it, otherwise your phone won't ring. The SECONDARY modtap is designed for DECT phones that supply their own power and so don't need the ringing capacitor.



SharePoint 2013 - Fix graphical glitch on timeline

posted 25 Jun 2015, 02:15 by Tristan Self

We had a weird graphical glitch on the timeline webpart on our SharePoint installation, we couldn't figure out what was happening. Until that is we checked out the element in F12 Developer tools, within one of our customisations we used the .ms-rtestate-field img directive within our custom site CSS file.

So this is what we saw:



To fix, I commented out this directive from our main.css (i.e. our custom CSS file), this resolved the problem, it also didn't appear to affect any of the other pages.

SharePoint 2013 - Hide Horizontal Scrollbar on Front Page

posted 23 Jun 2015, 07:45 by Tristan Self

On our Microsoft SharePoint 2013 home page, we had a horizontal scrollbar appear.

What seemed to be happening was within the master CSS file was that the "s4-workspace" was of the "ms-core-overlay" that affects the whole size of the page was using this:

 
#s4-workspace {
 width: auto !important;
 height: auto !important;
 overflow: auto !important;
}

As you can see the "overflow" was set to auto, this sets the scroll bars for the X and Y axis to auto. I want the X axis to be hidden, the page shouldn't hang over but it does a bit on a 1024 x 768 screen, so to resolve this I added the following code to our main.css file that is used for any adjustments to the base CSS for the whole theme.

.ms-core-overlay {
 overflow-y: auto !important;
 overflow-x: hidden !important;
}

As the main.css is evaluated after the base CSS, this overrides what is set in the base CSS. And boom, the scroll bar is gone!


Hide Search Box on top bar of SharePoint 2013 Front Page

posted 23 Jun 2015, 01:57 by Tristan Self

So you have the box at the top, this confuses our users, so we need to remove it. To do this you can just use a simple script on the front page.

1. Edit the front page and add the "Script Editor" web part.


2. Give it a suitable name, and then enter the following snippet:

 <style type="text/css">
#titleAreaBox #SearchBox {display: none !important;}
</style>

3. Save this web part and the page, and refresh, you'll see that the search box from the top has disappeared.

Change size of Search Box Web Part - SharePoint 2013

posted 22 Jun 2015, 03:00 by Tristan Self   [ updated 22 Jun 2015, 03:01 ]

You want to change the size of the search box web part, this is fairly straight forward when you know how.

1. Firstly get the name/ID of the search box. Open your SharePoint front page, right click in the search box and select "inspect element", then in the Developer box you should see the search box ID listed, it will be something like: ct100...... make a note of this.


2. Now you have done this you need to create a small CSS file with the following in it:

<style>
#ctl00_ctl45_g_8d3c81ab_972c_4bd5_839f_bdc8c1a4707e_csr_sbox { /* Search Box */
    width:250px;
    height:30px;
}
</style>
(Adjust the sizes as you need)

3. Now you want to save this in the correct location. Firstly open the front page of your SharePoint collection, click the cog to get the "Site Settings." Click the "Design manager", click on "3. Upload sites" make a note of the URL in my case this is: file://intranet.domain.com@80/_catalogs/masterpage/ open Windows explorer on your computer and map a network drive with this as the UNC path, you'll need to change it to: \\intranet.domain.com\_catalogs\masterpage\ however.

4. Copy the css file you created into here somewhere, and take a note of the URL to it.

5. Open the front page of SharePoint, edit the page and insert a "Content Editor" web part from media and content. Stick the web part somewhere out of the way and give it a label so you can recognise it. Then paste in the URL to the CSS file so in my example the "content link" is: http://intranet.domain.com/_catalogs/masterpage/intranet/searchbox_size.css using the "Content Link".

6. Once added, save and close. Hit refresh on the page and you should see that the search box has now changed in size! This stopped the weird two lined search box problem I was getting.

Useful Links





Ubuntu Linux 14.04 LTS - SNMPD Configuration with Baracuda Load Balancer

posted 18 Feb 2015, 06:55 by Tristan Self   [ updated 19 Mar 2015, 09:48 ]

We have some Linux web servers that we use for Moodle they are setup behind a Barracuda Load Balancer that then distributes the load based on how busy each of the web servers are. Essentially the more busy the server the less clients it is given to process. The barracuda load balancer uses an SNMP query determining the current load.

The Barracuda load balancer side is well documented, but the configuration on your Linux box is not so much, so assuming you've configured the Barracuda you just need to follow these steps on the 14.04 LTS Ubuntu server. Remember this is a basic configuration, offering basic security, so if you are looking to do this you need to review these settings, but this gives a basic operational configuration.

Firstly install SNMPD (the SNMP agent) that can respond to SNMP queries:
apt-get install snmpd (Install the SNMP listener)

Now download the SNMP MIBS, these are not included in the SNMP package anymore you need to get them separately with this.
apt-get install snmp-mibs-downloader

Once this is done you need to replace the /etc/snmp/snmpd.conf file with the following, this will allow you to access this SNMP agent from any host on the 192.168.0.0/24 network using the community string: "mycommunitystring."

###############################################################################
#
#  AGENT BEHAVIOUR
#
###############################################################################

#  Listen for connections from all IPv4 addresses on the network
agentAddress udp:161

###############################################################################
#
#  ACCESS CONTROL
#
###############################################################################

view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1

#rocommunity communitystring  default    -V systemonly
rocommunity mycommunitystring 192.168.0.0/24

rouser   authOnlyUser

###############################################################################
#
#  SYSTEM INFORMATION
#
###############################################################################

sysLocation    Place
sysContact     Things servicedesk@somewhere.com

sysServices    72

proc  mountd
proc  ntalkd    4
proc  sendmail 10 1

disk       /     10000
disk       /var  5%
includeAllDisks  10%

load   12 10 5

###############################################################################
#
#  ACTIVE MONITORING
#
###############################################################################

trapsink     localhost public
iquerySecName   internalUser
rouser          internalUser
defaultMonitors          yes
linkUpDownNotifications  yes

###############################################################################
#
#  EXTENDING THE AGENT
#
###############################################################################

extend    test1   /bin/echo  Hello, world!
extend-sh test2   echo Hello, world! ; echo Hi there ; exit 35

master          agentx


To get the SNMPD daemon to take the setting restart it:

service snmpd restart


Now from another Linux box you should be able to get the CPU load back using SNMPWalk to test with:

snmpwalk -v1 -c mycommunitystring myhost.domain.com 1.3.6.1.4.1.2021.10.1.3.1


If it works you should see something like: UCD-SNMP-MIB::laLoad.1 = STRING: 0.04

Now using the Test button on the Barracuda Load Balancer configuration, you can test the SNMP load balancing you should see it calculating a metric based on the current load of the server.

Additional Links:


Moodle 2.5 Error: "Cannot find data record in database table course_module"

posted 3 Oct 2014, 07:22 by Tristan Self

You get this error when opening a course, in this case we were using course 33. When entering the course, you get this error message:

"Cannot find data record in database table course_module"

http://moodle.domain/course/view.php?id=33

SOLUTION:

Open MySQL Workbench on the server and then run this query:

 select modinfo from mdl_course where id = <courseid>;

Then you should see the course record in the database, you need to clear the modinfo field that appears to force a cache refresh of the course to do this run:

 update mdl_course set modinfo='' where id = <courseid>;
 
Once this is run try accessing the course again, you should find you can get in again.



Run Multiple Commands from a Plink.exe SSH Session

posted 23 Jul 2014, 08:26 by Tristan Self

You can do this with:

plink.exe -ssh -pw <password> <username>@<hostname/IP> -m commands.txt

Then in the commands.txt file you just put in the commands that you wish to run within the session. This has been tested on Linux.

SharePoint 2013 - Managed Metadata Columns Empty in Lists

posted 30 Jun 2014, 00:35 by Tristan Self

We found that the metadata columns which use the term store, end up showing empty for all users apart from the Site Administrators. To fix this you need to grant privileges to the users in this list.

To do this navigate to: http://intranet/Lists/TaxonomyHiddenList/AllItems.aspx

Click on “List”->”List Settings” then click on “Permissions for this list.”

Add permissions of the users you need to see the metadata, to the permissions list with read permissions, then try the list again, they should be able to see the metadata and therefore any columns that include that data don’t show empty or null.

APC Management Card and Microsoft IAS (NPS)

posted 16 Apr 2014, 01:38 by Tristan Self

When setting up your APC Management card (this includes the ATS Devices) you need to configure the IAS policy as follows. I'm assuming you know the basics of configuring a RADIUS device this is specifically how to get administrative privileges for users logging into the Management card. Without these additional settings, the user will get in but only with read-only rights.
 
Open the NPS Console, expand Policies, Network Policies, right click the policy and click Properties.
 
Under the conditions tab you need to enter these settings:
User groups: < Security Group Name >
Client Friendly Name: < enter a string to match the name >
 
Click the Settings tab, then perform the following steps:
 
1. Under "Radius Attributes" then click "Standard" and then click "Add"
2. Select "Service-Type" from the list, then under the "Others" drop down select "Administrative", then OK.
3. Under "Radius Attributes" then click "Vendor Specific" and then click "Add"
4. Now select "Custom" from the Vendor dropdown and then click on "Vendor-Specific" and then click on "Add..."
5. Now on the "Attribute Information" screen you need to click on "Add..."
6. On the "Vendor-Specific Attribute Information" dialog, select the "Enter Vendor Code" radio button and type in: "318."
7. Select the "Yes, it confirms" radio button, then click on "Configure Attribute.."
8. Enter "1" in the "Vendor-Assigned Attribute Number" box, select "Decimal" from the "Attribute Format", then enter the "Attribute Value" of "1", then click on OK.
9. Save all the settings, then test it from the UPS management card, you should find you can log on and get administrative privileges.
 
 

1-10 of 34