How to Fix Sudo User in Mythbuntu 12.04

I have no idea how it was corrupted or the group membership lost but it was and I found myself with a system I could not do any administration with. Frustrating to say the least. When looking on the web for answers, I came across many posts for using visudo command. But to use it you need to be able to sudo in the first place. Finally I ran across this post on Psychocats. Very nice work and lots of screen shots on this site. But I ran into a small (big) problem. The first command to enable the root file system to be read/write did not work and resulted in error. This is the errant command from the recovery mode root prompt:

#mount -o remount,rw /

It is the / part that is in error here. Simply put it turns out to be the wrong syntax. I was able to discover that answer here and a big thanks goes to SirCharlo for posting.

This is the command I used to make the file system read/write:

#mount -o remount,rw /dev/sda1

This worked and I was able to follow the instructions on Psychocats and fix my sudo group membership. The next reboot I tested and it worked as expected. To recap, if you find your user can no longer sudo, take these steps:

  1. Boot to Recovery Menu by holding the shift key at boot.
  2. Choose the root shell prompt option.
  3. Make the file system r/w using mount -o remount,rw /dev/sda1  (change sda1 to match your root partition).
  4. Add user to sudo group with adduser user sudo  (change user to your user name).
  5. Exit and reboot.

This will fix Ubuntu type systems based on version 12.04 and up at the time of this posting. For other versions please refer to the excellent instructions on Psychocats. Once again an issue gets solved via the awesome community surrounding Linux and in this case Ubuntu in particular.

penguin2sm3

Awesome Raspberry Pi Supercomputer Build

This is in my opinion the coolest project I have ever come across for the Raspberry Pi. You have to check this out if you are true geek. Also they include some of the best most detailed instructions on how to repeat this project. This is a must see and there is a video too.

Raspberry Pi at Southampton

penguin2sm3

How to View System Logs in Real-Time

If you are having an issue especially with hardware or some other reproducible manner, here is a solution to see just what is getting written to the sys log in real-time. Perhaps this will aid in trouble shooting the issue. I know it has helped me in the past identify a device’s mount point when it would not show with the mount command. I ran across this string a few years ago in a forum and have saved it ever sense. I want to share it with you here.

The command is the tail command run in a separate terminal window if needed as root or with escalated privileges with sudo.

# tail -f /var/log/syslog

That’s all there is to it. Of course adjust the path if your logs are in a different directory and read the man page if you want or need additional options. You can expect some output like this:

johnny@polarbear ~ $ sudo tail -f /var/log/syslog
[sudo] password for johnny:
Jan 17 20:29:25 polarbear rtkit-daemon[1811]: Successfully made thread 2111 of process 1809 (n/a) owned by ’1000′ RT at priority 5.
Jan 17 20:29:25 polarbear rtkit-daemon[1811]: Supervising 3 threads of 1 processes of 1 users.
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> (eth1): IP6 addrconf timed out or failed.
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> Activation (eth1) Stage 4 of 5 (IPv6 Configure Timeout) scheduled…
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> Activation (eth1) Stage 4 of 5 (IPv6 Configure Timeout) started…
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> Activation (eth1) Stage 4 of 5 (IPv6 Configure Timeout) complete.
Jan 17 21:17:01 polarbear CRON[2279]: (root) CMD (   cd / && run-parts –report /etc/cron.hourly)
Jan 17 21:48:19 polarbear goa[2395]: goa-daemon version 3.6.0 starting [main.c:112, main()]
Jan 17 22:17:01 polarbear CRON[2728]: (root) CMD (   cd / && run-parts –report /etc/cron.hourly)
Jan 17 23:17:01 polarbear CRON[3044]: (root) CMD (   cd / && run-parts –report /etc/cron.hourly)
Jan 17 23:31:20 polarbear anacron[3408]: Anacron 2.3 started on 2013-01-17
Jan 17 23:31:20 polarbear anacron[3408]: Normal exit (0 jobs run)
Jan 17 23:31:27 polarbear kernel: [10938.411516] usb 1-1.2: USB disconnect, device number 3
Jan 17 23:31:32 polarbear kernel: [10942.680548] usb 1-1.2: new full-speed USB device number 5 using ehci_hcd
Jan 17 23:31:32 polarbear kernel: [10942.775553] usb 1-1.2: New USB device found, idVendor=046d, idProduct=c52f
Jan 17 23:31:32 polarbear kernel: [10942.775563] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 17 23:31:32 polarbear kernel: [10942.775569] usb 1-1.2: Product: USB Receiver
Jan 17 23:31:32 polarbear kernel: [10942.775573] usb 1-1.2: Manufacturer: Logitech
Jan 17 23:31:32 polarbear kernel: [10942.778371] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input13
Jan 17 23:31:32 polarbear kernel: [10942.778814] hid-generic 0003:046D:C52F.0003: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1a.0-1.2/input0
Jan 17 23:31:32 polarbear mtp-probe: checking bus 1, device 5: “/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2″
Jan 17 23:31:32 polarbear kernel: [10942.781280] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.1/input/input14
Jan 17 23:31:32 polarbear kernel: [10942.782247] hid-generic 0003:046D:C52F.0004: input,hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1a.0-1.2/input1
Jan 17 23:31:32 polarbear mtp-probe: bus: 1, device: 5 was not an MTP device
^C johnny@polarbear ~ $

You can see where I disconnected and reconnected both my power cable and USB receiver for the mouse. A control c will stop the output. Put this tip away for the one time you may need it and if you ever do please come back and tell us how you used it and if it helped you solve a problem.

penguin2sm3

Introduction to Synaptic Package Manager

In this short video we will go over the Synaptic Package Manager and at the end you should have enough information to be able to use and explore this terrific tool.

I hope you enjoyed the video and will continue to explore. Synaptic is quite powerful and capable of so much more than I have covered here.

penguin2sm3

How To Use Software Manager

This is a short ‘How To’ video I created on how to use the Software Manager in Linux Mint 14 XFCE. This is a basic instructional video and is mainly aimed at the newer Linux users. We welcome comments and suggestions from the more experienced users too. This was created using the Record My Desktop utility and after the upload to You Tube has lost a bit of its clarity unless you run it in 720p. In the native ogv format it was very sharp. I hope you enjoy it. Click the link to view the video.

penguin2sm3

What App Do I Use?

Now that you have Linux installed you may be wondering what do I use to replace (insert any Windows or Mac application name here)? This is a very common question even with the distributions that come with an application for almost every need and purpose. What makes this so tough to answer? In my opinion it is mostly we simply do not know what is available and what the new applications do that are already installed. Linux distributions can and do provide hundreds to thousands of applications for many uses. So many in the mainstream distributions that it can be mind-boggling.

Even the lesser known Linux distributions such as AntiX can pull applications from the repositories of the much more widespread distribution Debian. And that adds another question for some people, what is a repository? (Answer: A collection of software maintained, tested and updated for a particular version or distribution chain.) This can all be very confusing to newer users of Linux. (Note also that I used the Debian tree of Linux as an example but could have picked several others, Slackware, Red Hat, Fedora all have distros based on them that pull from upstream repositories and also maintain their own repositories supporting themselves and this listing is certainly not all-inclusive at all.) Some distributions use packages they either create or bundle all while maintaining the main distribution giving their users many choices for applications of all types.

I think that most users will figure out the replacements for Office software like Writer and Calc. We will get used to seeing Rhythmbox instead of Media Player. Nemo, Nautilus or Thunar will become very familiar for interfacing with the file system. But what many do not know is there are alternatives and sometimes several to do the same thing. For example, music players is a category most of us will use. I named Rhythmbox above but could have named Banshee, Clementine, VLC, Kaffeine, MPlayer or Totem and this list is not totally inclusive and even crosses boundaries for other media types many of them can handle just as Windows Media Player handles multiple media types. This is just one category and one example, there are many applications that have alternatives.

Knowing what we want to do is the first step, finding the application is step two. This can be as easy as learning the name of an application that is already installed but we did not know the name of or learning how to pull from the repositories one of the thousands of applications that are there waiting to be used.

Nearly all of the distributions are making finding what you want easier than ever and installation of the software is extremely easy too. But what do you do if you have this favourite Mac or Windows program and want a Linux alternative but do not know the name of one? Well you can search the Internet, that may or may not tell you the name of the package to install. And you are definitely much better off installing from the repositories for your distribution even if you do find it on the Internet. This ensures better security and the meeting of all dependencies for the application.

Or you can use a tool like this one, the Linux App Finder. This is a really cool website where you enter the name of the program you want to replace and it turns out choices for alternatives. Many if not all of them will be in your repositories or a repository you can add as an additional source. You can even install some of the programs from the site but the repositories for your distribution are the preferred method.

Here is a screen capture for a search of notepad replacements as an example.

Search for notepad alternatives.

This is a decent list to get someone started and I doubt it is all of the available replacements for notepad. I stumbled onto this website a few years ago and found it to be very helpful. I hope you find it helpful too.

penguin2sm3

How To Install Atheros Wired Drivers

Wired driver installs? Yes if you are using the newest of chip sets from Atheros, it might not be in the kernel yet and you could be facing no interface found when attempting to configure the network. The driver patch is pretty easy to install if a few steps are followed while using wireless or from another computer.

Before you start run the command lspci in a terminal window to determine what driver you need. You will see something similar to this at the bottom of the output window:

02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
03:00.0 Ethernet controller: Atheros Communications Inc. AR8162 Fast Ethernet (rev 10)

In my case I have the Broadcom BCM4313 wireless controller and the Atheros AR8162 Ethernet controller installed as hardware. I am using kernel 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux in this Linux Mint 14 XFCE edition. In my case the wireless was indeed supported right away but the wired controller was not.

I first found the instructions here on the Linux Foundation but for me they were missing the crucial step of installing Linux headers build-essentials which is explained in this Ubuntu forum post here. The wget command in the instructions will pull drivers from this index. On the Linux Foundation site you will see a list of two chip sets, alx and atl1c. These instructions are for the alx series of chips. If you have the atl1c chip it might be as easy as replacing the alx in the command with atl1c but I have no way in which to test. These are the instructions I followed in a terminal window for the alx controller:

sudo apt-get install linux-headers-generic build-essential
wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.8-1-snpc.tar.bz2
tar -xf compat-wireless-3.6.8-1-snpc.tar.bz2
cd compat-wireless-3.6.8-1-snpc
./scripts/driver-select alx
make
sudo make install
sudo modprobe alx

Note the line starting with wget is wrapped to the next line. If all went well you now have a wired connection active. For some they will already have the build-essential files installed and can skip this step but for me this was the one line missing in other instructions that made this work. It does not hurt to run it again since if they are installed the command will tell you. Also note that if this is being done on another computer, follow the instructions to get the driver patch and transport it to the computer needing it. Once copied to the target computer start again at the tar command. Since this is a kernel patch, if you update the kernel you will need to run this again until the patch becomes part of the kernel.

I hope having this all in one place will help someone get connected until this patch makes it into the kernel itself.

penguin2sm3