Showing posts with label opensuse. Show all posts
Showing posts with label opensuse. Show all posts

Monday, 17 February 2014

Loading 'loop' Device in OpenSUSE

Okay, I'm still a noob with OpenSUSE 13.1 - I've kept my eye on it for years but never took the plunge until recently.  One of the applications I have on every machine I own is Truecrypt.  Installed it direct from the site then tried to mount a volume when I got this error.


Problem is explained right there in the error message.  And its an easy one to fix.  In fact, the loop device is used for a lot of common things I expect to be doing, so I will just ensure its enabled in the kernel.

A quick check for how OpenSUSE does it (told you I was a noob), then loaded the loop kernel module with:

    sudo /sbin/modprobe loop

You can test if this loaded by:

    sudo /sbin/lsmod | grep loop

The status of the loop module is shown, if loaded - and if its not loaded, then nothing will be returned.

Lastely, I wanted to ensure loop gets loaded every time I boot the machine, so I added this:

    sudo echo loop > /etc/modules-load.d/loop.conf

Back to Truecrypt, voila!

Saturday, 8 February 2014

Changing How sudo Works in openSUSE

The default way a user in openSUSE 13.1 executes sudo to run a restricted file is that they need the root user password rather, as many other Linux distributions, than their own.  By design, this is a better way to manage root access - but  if you want sudo to require your password rather than root's then keep reading.

Personally, I like a mixture of both on my personal machines.  I sometimes su, using root's password and at other times I use sudo with my own password.

To do this, the first thing I do when I install openSUSE is to give root a different password than my own.  Do this by deselecting the "Use this password for system administrator".


If you already have openSUSE installed, then simply su to root and then passwd to set a new password.

Now the fun stuff.

As the root user execute visudo, you need to comment out the last two lines of the below:



In the same file, you need to enable the wheel group by uncommenting the last row from below:


Make sure you save when you quit visudo.

One last step, as root still, add the privileged user to the wheel group ala:
    useradd -G wheel jeff
All done. You need log out and back in as the user, sudo will now act as described above.