]]>http://blog.inf.ed.ac.uk/neilb/2018/03/09/embedded-video-test-2/feed/0MathJax Testhttp://blog.inf.ed.ac.uk/neilb/2017/04/12/mathjax-test/
http://blog.inf.ed.ac.uk/neilb/2017/04/12/mathjax-test/#respondWed, 12 Apr 2017 13:52:15 +0000http://blog.inf.ed.ac.uk/neilb/?p=336Apparently the mathjax CDN is closing at the end of April.

Insert the USB into the G2.
Reset the G2, and press F9 or Escape to get to the option to boot from USB.
Select “File” and browse to the EFI/Boot dir and select Bootx64.efi (if it didn’t just automatically run itself).

You’ll probably get a warning about choosing to abort running startup.nsh, that’s an MSI file that is benign, and you could have not bothered copying it.

You can let it run, or skip it, eventually you’ll end up with at the EFI Shell prompt.

Type:

fs0:
cd Local-EFI
update

and the updater should run (without further prompting).

Remember to undo the USB booting in the BIOS (if that was your previous setting)

You could do some tidying and reorganising, eg that zip contains more than you need, but it shows that it can be done.

We are hoping to PXE boot into the EFI Shell, so hopefully removing the need to mess with BIOS settings. After some experimenting and reading, this looks like it is only possible by enabling EFI mode in the BIOS anyway, so doesn’t save you from having to fiddle with the BIOS.

Most of this is from memory, so some details may need checked.

Neil

]]>http://blog.inf.ed.ac.uk/neilb/2017/03/06/hp-g2-me-firmware-update/feed/1Auth SMTP fail2banhttp://blog.inf.ed.ac.uk/neilb/2017/02/28/auth-smtp-fail2ban/
http://blog.inf.ed.ac.uk/neilb/2017/02/28/auth-smtp-fail2ban/#respondTue, 28 Feb 2017 12:30:57 +0000http://blog.inf.ed.ac.uk/neilb/?p=322I’ve added fail2ban to the SL7 version of our auth smtp service. None of the sendmail filters that come with the fail2ban RPM seemed like they’d do the trick for us, so I’ve just overridden the supplied filter.d/sendmail-auth.conf with a sendmail-auth.local containing just:

Though that isn’t enough to get it to match, as the default log level (9) for sendmail doesn’t log auth failures. So we also have to run at log level 10.

Currently I’m using the local lcfg-hostsdeny and tcpwrappers template like sshd does, but we should probably look at using iptables instead.

In the few days its been running, 21 IP addresses have been banned.

]]>http://blog.inf.ed.ac.uk/neilb/2017/02/28/auth-smtp-fail2ban/feed/0Cosign/EASE drupal admin problemhttp://blog.inf.ed.ac.uk/neilb/2016/10/28/cosignease-drupal-admin-problem/
http://blog.inf.ed.ac.uk/neilb/2016/10/28/cosignease-drupal-admin-problem/#respondFri, 28 Oct 2016 13:59:59 +0000http://blog.inf.ed.ac.uk/neilb/?p=312We’ve been holding off using Cosign/EASE on our EdWeb distro site, until we had a clear solution to the issue of how to become the Drupal admin user (user=1). As soon as we turn on Cosign authentication, then we’ll only ever be able to be user UUN. Even if we created functional accounts (to use IS parlance), then due to our automatic authentication via browsers on DICE, it isn’t very convenient to become anyone other than our UUN. Also, on principle, we don’t have accounts in our authentication service that aren’t associated with an actual individual.

Asking around it sounded like there were two options people used:

Just don’t sweat it, and use drush from the command line to do all your admin type duties.

Either give yourself (or a functional account) all the available drupal permissions, so you can do everything.

Not being that fluent with drush, and that our web editors wouldn’t have necessary command line access to the server, 1. didn’t seem the best solution. Options 2 has problems, as the EdWeb developers are a bit wary of this and are not making any guarantees (in fact more likely the opposite) that we wouldn’t be storing up problems if user regularly published with all permissions granted.

So what we’ve decided to do is something a bit like a blend of the two options above.

Our solution

Ceate a new “admin user” role:

drush role-create 'admin user'

Give the existing EdWeb role “system administrator” a couple of extra
permissions:

The “system administrator” role is already one that should only be given to a few select people who know what they are doing. Generally people will not have this role.

Then as one of those users who is a “system administrator”, via the web GUI, give the new “admin user” role all the other permissions with a couple of mouse clicks, excluding the “bypass …” permissions.

The above steps should only need to be done once to get things set up.

Now if any of the existing “system administrators” need to do something as the admin (user=1) person, then they can temporarily give themselves the “admin user” role, do what we need to do, and then remove the role from themselves once they are done. They should know not to create or modify content with the “admin user” role, but if they did, then hopefully by not having the “bypass …” permissions, things would be OK, but we shouldn’t rely on that.

As I write this, I might look at adding a block that only shows up when you have the “admin user” role, to remind you that you are (nearly) all powerful.

It’s a bit of a faff to have to add and then remove the “admin user” role, but luckily the times you need to be user=1 is fairly rare. And probably just as much as a faff if we were to do thing via functional accounts.

Notes

The suggestion to not grant the “bypass …” permissions came from Mairi. In an email/slack post she said:

On the subject of the ‘bypass content access control’ permission, the problem is that because permissions are being bypassed, you wouldn’t necessarily know which hooks are firing & which aren’t. Bypassing permissions will just invisibly allow the user to do anything, with no indication of whether data integrity is OK until something goes wrong. For example, we believe it’s probably OK to publish as user 1, provided that user is configured with relevant group memberships; however, we advise against it because nothing will tell you, when logged in as user 1, that the group hooks are actually firing. Which leads to unforeseen consequences when content is inadvertently created/published without the correct permissions being in place. If you give another user those ‘bypass’ permissions, the same will apply – i.e. that user could be publishing content without the correct hooks firing.

]]>http://blog.inf.ed.ac.uk/neilb/2016/10/28/cosignease-drupal-admin-problem/feed/0Code sprinthttp://blog.inf.ed.ac.uk/neilb/2016/08/26/code-sprint/
http://blog.inf.ed.ac.uk/neilb/2016/08/26/code-sprint/#respondFri, 26 Aug 2016 13:52:00 +0000http://blog.inf.ed.ac.uk/neilb/?p=304Back in July I attended IS’ first EdWeb code sprint. IS are trying out the idea to encourage more collaboration, and find an alternative source of resource to actually get EdWeb code development done.

I found it very useful, though for this first one, everyone was learning, and though I did get my submission back to their git accepted, it was a rather minor change, but real outstanding work that needed done at some point.

There’s a new updated, 1.12, which I’m about to try. It will be interesting to see if my code changes are in there.

This week all my changes have made it to stable, and there are now 1.2.x versions of the lcfg-openafs (server only) and lcfg-openafs-client components for SL7.

I spent a bit of time teasing the two components apart, so either can be installed in isolation (or together) on a machine. In hindsight it would have been cleaner to leave behind the “openafs” component in the SL6 world, and created a new openafs-server component like Stephen did for the openafs-client component. It would have made the various header files and schema files a cleaner split, but it’s done now.

Craig, I and the Unit have their AFS volumes on a gresley, a new SL7 AFS server. We need to move some more guinea-pigs, but it all seems fine.

]]>http://blog.inf.ed.ac.uk/neilb/2016/08/26/sl7-afs-server/feed/0SL7 Wakloghttp://blog.inf.ed.ac.uk/neilb/2016/07/22/sl7-waklog/
http://blog.inf.ed.ac.uk/neilb/2016/07/22/sl7-waklog/#respondFri, 22 Jul 2016 13:47:24 +0000http://blog.inf.ed.ac.uk/neilb/?p=299Having a look at apacheconf-waklog.h on DICE SL7. This is actually the first SL7 web server stuff I’ve looked at. So first of all I thought I should try getting a minimum SL7 apacheconf.h web server going.

Now, after doing an ‘om apacheconf stop’, ‘om apacheconf start’ worked and left httpd process running with /var/www/html/ as the docroot, but with all access denied. I’m presuming a reboot would have had a similar affect.

I then added a simple vhost to open up access to /var/www/html/ so that I could dump stuff in their and convince myself the basics worked.

With that done, I was able to drop files into /var/www/html/ and they would be served. Equally I added some symlinks to other bits of the file system, and they were followed unless file permissions said otherwise. So a symlink to /afs/inf.ed.ac.uk/ showed the contents of publicly accessible stuff, but all other access was denied by ACLs.

So now I know if I add apacheconf-waklog.h and get it working, if they symlinks to AFS show more content, then httpd will have obtained the necessary AFS PTS tokens.

Neil

]]>http://blog.inf.ed.ac.uk/neilb/2016/07/22/sl7-waklog/feed/0OpenAFS serverhttp://blog.inf.ed.ac.uk/neilb/2016/06/27/openafs-server/
http://blog.inf.ed.ac.uk/neilb/2016/06/27/openafs-server/#respondMon, 27 Jun 2016 16:43:11 +0000http://blog.inf.ed.ac.uk/neilb/?p=279The work on the OpenAFS server for SL7 has been a tricky one, and still not fully resolved.

As a bit of background, in SL6 the single component, openafs, did both AFS client and server configuration for a host. With the switch to SL7, the MPU kindly decided to do the work for the AFS client on SL7 (and systemd), but this meant splitting the client side into a new component openafs_client, and some corresponding header files.

When starting work on the server side, I did consider (and indeed started) a new openafs_server component. However, I then decided this was going to lead to a lot of work changing the majority of existing headers and resources to the new named component, so after some discussion with Stephen, decided to make the existing openafs component “server only” for SL7 onwards.

This too has lead to some problems as both SL6 and SL7 machines included the openafs.h headers, but they have different meanings on the different platforms.

Fortunately most of the openafs.h headers just concern themselves with installing the actual openafs RPMs on the system. So some #ifdef guards for SL6 or 7 now make sure the right bits of -client or -server are further included, depending on what is needed for the machine.

There are still problems, such as the lcfg-openafs-client RPM depends on the lcfg-openafs RPM, the shared template file should be split. Also there is a common /etc/sysconfig/openafs file between client and server, both using template toolkit to maintain its content. This also needs to be split so that the client and server use different files. For the moment, we just state that for SL7 a server cannot also be a client. Which also means I need to make sure the localhome stuff works on SL7 servers.

]]>http://blog.inf.ed.ac.uk/neilb/2016/06/27/openafs-server/feed/0Cosign and cronhttp://blog.inf.ed.ac.uk/neilb/2016/05/06/cosign-and-cron/
http://blog.inf.ed.ac.uk/neilb/2016/05/06/cosign-and-cron/#commentsFri, 06 May 2016 11:42:50 +0000http://blog.inf.ed.ac.uk/neilb/?p=274Having got EdWeb working with EASE, I went back and tried it against our weblogin CoSign service, and that too works. My initial problems were probably the openldap issue that EASE had.

I’ve still not got a clear way to access a site as “admin” once EASE/Cosign is enabled, other than temporarily disabling the UoE LDAP and EASE modules, and reverting to the old way.

I’m looking at an “admin” site that uses basic auth, so I can sign in as “admin”, and though that has a slight success, it then fails with what looks like a failure to find “admin” in the LDAP and then extract an email address, and role information for him. I’m not sure if that should be considered a bug or not.

Also had a look at cron, has Kenny was having problems with the new scheduling on our test 1.10. A mail to UWS Tech suggests that using the wget and cron key is the way to do it, rather than using drush (which I’d been experimenting with).