. .

Configuring Sudo on Debian

by Nick Charlton on June 26, 2009 at 12:00 pm

Setting up sudo on Debian can seem daunting at first, but the process is really quite simple.

To do this you must use the command “visudo”. Whilst you do not need to use “vi/vim” to do the actual editing (as it will use your preferred editor as listed in .bashrc), you will not be able to save changes.

From here you will see the config file. Under “# User alias specification” you will want to list the users required to access. You can comma separate values here.

	# User alias specification
	User_Alias STAFF nickcharlton, otheruser

Next, although optional, it is possible to specify the applications that the user can run.

	# Cmnd alias specification
	Cmnd_Alias DEB = /usr/bin/apt-get

Similarly, this section can be comma separated. On a system where it’s users can be trusted at a higher level, it’s not important to drill down tightly on these.

Next, you need to allow access under the “# User privilege specification”. Where no commands have been specified it is appropriate to simply duplicate that of the root user.

	# User privilege specification
	root ALL=(ALL) ALL
	MAINTAINERS ALL = DEB
	STAFF ALL-(ALL) ALL

And that’s it. Another simple task, which at first can seem a little daunting.

Sources: NewbieDoc: Configuring Sudo to Run Programs as Another User.

Configuring a post-login Welcome Banner on Debian

by Nick Charlton on June 24, 2009 at 5:02 pm

Configuring a “Welcome Banner” is a great way to notify your users about the machine they are about to login to. I personally use this to inform the user of the IP, Hostname, OS version and someone to contact.

Edit the file under “/etc/motd”.

Change this to something informative such as the below:

        ========================================
        =         Welcome to Hitchcock         =
        =  IP: 10.10.10.10                     =
        =  Hostname: hitchcock.example.com     =
        =  OS: Debian 5.01/Lenny               =
        ========================================

Just a short one this, but useful to know.

Upgrading Debian Etch to Lenny

by Nick Charlton on June 21, 2009 at 3:35 pm

Now that I have a bit more time on my hands, it was time to get around to fixing problems and issues floating around for the last few weeks, or in this case, months. This briefly describes how to upgrade Debian Etch to Lenny.

Backup

Before you start anything, it is important to get a latest backup – especially if you do not already have an automated backup solution in place. I would suggest reading this article from the Ubuntu Wiki in regards to producing a tar image of your system.

Adjust the APT Sources

By changing the APT sources from Etch to Lenny, you in effect tell the system to grab the new packages from the new distro and replace the ones you already have.

This should look similar to the following:

	deb http://ftp.uk.debian.org/debian/ lenny main contrib non-free
	deb http://security.debian.org/debian-security lenny/updates main contrib non-free
	deb http://ftp.uk.debian.org/debian/ lenny main

Note where “etch” once was, “lenny” now replaces it.

Update the Sources List

So APT can see the new packages, it is important to update them. I’m going to use aptitude to carry out the next few steps.

	# aptitude update

Update the Package Install Tools

	# aptitude install apt dpkg aptitude

Perform the Full Upgrade

	# aptitude full-upgrade

Final Points

  • You won’t need to reboot if you stay with the same kernel version.
  • When you get asked to update specific packages to the “maintainers version”, answer with Yes.

Sources: How to Guide: DebianAdmin.com, Debian Lenny Release Notes

Blog Update: June

by Nick Charlton on June 18, 2009 at 8:01 pm

Rather inspired by The Art of Nonconformity, I’ve decided to start a monthly series of posts to highlight a few things I’m working on, any site plans and so forth. Usually this would be released on 1st of each month, but now I’m finished with exams I’m starting now.

Posts

Here, I’ll pick out a set of a few posts to mention. This months covers a few from previous months.

Changes

This section will document any changes to this specifically.

  • I’m working on a new theme.
  • You’ll now see a list of “Related Posts” at the end of each post.
  • My code blog is going quite nicely, and will soon be on a different domain.
  • Whilst spam isn’t such an issue, comments are going to be switched off bar specific posts and then switched off after 14 days.

Projects

This section is about the projects I’m working on.

  • I’m now working as a developer on a groupware (calendaring, etc) startup. More details will follow, but that will be my main focus.
  • I have several projects which need clearing up ready for release. Including:
    • A PHP based server admin framework.
    • A single file blog, in PHP using SQLite.
    • Latteapp, my web app from several months ago.
  • I have a large list of things I want to teach myself over the next few months. Including:
    • Python
    • Git
    • Brush up on C
    • Cocoa, Mac & iPhone Development
    • jQuery
    • More Linux stuff, such as cron, vim, GTK, etc.
  • I am, however, still available for work. So if you have a project. I’d love to work on it.

And that concludes this months update. Thanks for reading.

Playing with Chromium

by Nick Charlton on June 1, 2009 at 11:43 pm

After following through to some links about Chrome, I discovered some development builds of Chromium, Chrome’s open source counterpart. So I grabbed the latest developement version (17232) and thought I’d give it a spin.

Whilst Chrome for Mac was seemingly taking ages to arrive, I think I can make the prediction that it will soon be released, this development build is nearly there – although it did crash on me once when trying out some HTML5 experimental stuff.

Chromium

Chromium: Twitter

About

Chromium: About

Dev Tools

Chromium: Dev Tools

Interestingly, the development tools seem to have been taken directly from WebKit in this build – so the same version will be used in Safari. I’m unable to tell if this is because it’s yet to be implemented, or whether it’s staying. Either way, the default is quite excellent.

Not Quite Finished

Various aspects of this build aren’t quite finished yet. Take for example the settings, these are all populated on the Windows build, but here are quite positively absent.

Chromium: Preferences "Under the Hood"

In Conclusion

I’m currently running this as another browser to run along with (I already use both Firefox and Safari simultaneously), but a couple of issues such as a lack of flash support make me wish it were the full version. In doing this, I’ve made my desire for Chrome on OS X quite double…

You can get some more screenshots on Flickr