EzDev.org

14.04 interview questions

Top 14.04 frequently asked interview questions


How to enable ssh root access on Ubuntu 14.04

I´d like to enable the ssh root access on Ubuntu 14.04. Editing the /etc/ssh_config (PermitRootLogin yes) didn't affect anything.


Source: (StackOverflow)

Unity Tweak tool fails to start with the error "com.canonical.unity.webapps schema is missing"

enter image description here

com.canonical.unity.webapps
In order to work properly, Unity Tweak Tool recommends you install the necessary packages


Source: (StackOverflow)

An easy way to create a desktop shortcut?

I wonder, isn't still there an easy way to create a desktop shortcut in Ubuntu 14.04 (or Unity)? There is no context menu on desktop doing this.

So I tried the following: I looked for an app I want to create a shortcut for in the dash, then I tried to drag it to the desktop. And guess what? I got the error:

enter image description here


Source: (StackOverflow)

Wireless networking not working after resume in Ubuntu 14.04

[Update]:
The same problem exists in Kubuntu and is solved in the same manner.
[Solved]:
By applying the following command nmcli nm I got the following:

Before suspend

RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN      
running         connected       enabled         enabled    enabled         enabled  

as can you see the state is connected and the rest are enabled and running

After suspend

RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN      
running         asleep          enabled         enabled    enabled         disabled

as can you see the state is asleep meaning our dear network manager is still napping, so to solve use the fallowing command line:
sudo nmcli nm sleep false
this tells the network manager to wake the hell up. to make this permenant :
create a script in /etc/pm/sleep.d containg the following (and don't forget to mark the script as executable):

#!/bin/sh

case "${1}" in
        resume|thaw)
        nmcli nm sleep false
                ;;
esac

Thanks to this

The original problem:

I just downloaded Ubuntu 14.04 and installed on my laptop: ASUS X61SL with Intel P8400 Core2Duo x64 processor.
When I close the lid, the system is suspended, but when I open the lid again and resume, the wireless networking is not activited (networking as a whole is disabled), and when I select "Enable Networking" nothing happens.
This is the information about my wireless adapter:

$ lspci | grep -i wireless
02:00.0 Network controller: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) (rev 01)  

This problem wasn't present in Ubuntu 13.04, Linux Mint Debian Edition or Debian 7 wheezy (GNOME or KDE).

Edit: few test with the following results :
The problem effects my wireless and wired networking.
Note: I need to add the pci=nomsi line to grub in order to boot.
When logging out manually then suspend then resume then log in every thing works just fine.
When suspending directly while logged in the problem happens.
Locking and suspending causes the same problem as suspending directly.
Also this problem appearnlty affects log out function: if you chose log out from the user menu in unity panel then you wan't log out, but if you use the command line gnome-session-quit --logout then you can log out.
Now with lshw -C network output:
Normal (fully functional networking):

  *-network               
       description: Ethernet interface
       product: 191 Gigabit Ethernet Adapter
       vendor: Silicon Integrated Systems [SiS]
       physical id: 4
       bus info: pci@0000:00:04.0
       logical name: eth0
       version: 02
       serial: 00:24:8c:1e:f8:53
       size: 10Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)
  *-network
       description: Wireless interface
       product: AR928X Wireless Network Adapter (PCI-Express)
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: 00:15:af:e2:13:db
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A ip=6.6.6.8 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:16 memory:fdff0000-fdffffff

After resume ("/etc/pm/config.d" does not contains "unload_modules"):

 *-network DISABLED      
       description: Ethernet interface
       product: 191 Gigabit Ethernet Adapter
       vendor: Silicon Integrated Systems [SiS]
       physical id: 4
       bus info: pci@0000:00:04.0
       logical name: eth0
       version: 02
       serial: 00:24:8c:1e:f8:53
       size: 10Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)
  *-network DISABLED
       description: Wireless interface
       product: AR928X Wireless Network Adapter (PCI-Express)
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: 00:15:af:e2:13:db
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
       resources: irq:16 memory:fdff0000-fdffffff

When I added the file unload_modules to directory "/etc/pm/config.d" as suggested by here, after logging out, suspend ,resume then log in the networking works but I cannot connect to my wireless network.
Again the result of lshw -C network After resume ( "/etc/pm/config.d" contains "unload_modules"):

 *-network DISABLED      
       description: Ethernet interface
       product: 191 Gigabit Ethernet Adapter
       vendor: Silicon Integrated Systems [SiS]
       physical id: 4
       bus info: pci@0000:00:04.0
       logical name: eth0
       version: 02
       serial: 00:24:8c:1e:f8:53
       size: 10Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)
  *-network DISABLED
       description: Wireless interface
       product: AR928X Wireless Network Adapter (PCI-Express)
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: 00:15:af:e2:13:db
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
       resources: irq:16 memory:fdff0000-fdffffff

The contents of 'unload_modules" where:

SUSPEND_MODULES="$SUSPEND_MODULES ath9k"
SUSPEND_MODULES="$SUSPEND_MODULES sis190"

Where 'ath9k' is my wireless module and 'sis190' is my Ethernet module.


Source: (StackOverflow)

How to secure my laptop so that hacking by physical access is not possible?

I messed up my system earlier, I was greeted with a black screen, when booting in to Ubuntu. When I started up my laptop, I selected the recovery option from the grub menu, and chose fallback at root terminal. I saw that I was able to use the add user command, with it, I probably could use to create a privileged user on my machine.

Isn't that a security issue?

One could have stolen my laptop and at startup chose recovery and add another user, I'm fudged then. Including my data.

Come to think of it, even if you somehow remove that entry, one could boot from a live-CD, get a chroot up and running and then add another user, with the right privileges that allows it to see all my data.

If I set the BIOS to boot at my HD only, no USB, CD/DVD, Network startup, and set a BIOS password, it still wouldn't matter, because you'd still have that grub recovery startup entry.

I am fairly certain that someone from China, Russia can't hack my Ubuntu Trusty Tahr, from the network, because it's secure like that. But, if one has physical access to my - your - machine, then, well, that's why I'm asking this question. How can I secure my machine so that hacking through physical access is not possible?


Bug Report:


Source: (StackOverflow)

How to disable IPv6 in Ubuntu 14.04?

I am using Ubuntu 14.04. And I have done the following to disable ipv6.

I have open /etc/sysctl.conf using gedit and paste the following lines at the end of sysctl.conf.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1 

But when I check it using following command,

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

I am getting result as '0'( i.e still Enabled). Please help me to disable ipv6, so that I can use hadoop.

I followed instructions from this link.


Source: (StackOverflow)

Last upgrade crashes network manager (no internet connection, no applet)

While upgrading today, something caused my wireless network manager to disappear. Not even connecting via wired connection.

This error is being shown by files:

**(nm-applet:2716): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files 

(nm-applet:2716): nm-applet-WARNING **: Error connecting to ModemManager: Error calling StartServiceByName for org.freedesktop.ModemManager1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid 

(nm-applet:2716): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries 

(nm-applet:2716): nm-applet-WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files 

Is there a patch I can download through windows and send through to my ubuntu, or is it a case of having to reload everything? I tried running two versions back but still no internet access.


Source: (StackOverflow)

Screen Resolution Problem with Ubuntu 14.04 and VirtualBox

Environment: Lenovo T530 running Windows 7. Have installed Ubuntu 14.04 on a virtual machine using VM Virtual Box. Have installed all the updates from both Virtual Box and Ubuntu.

Problem: While in Ubuntu's desktop and other Ubuntu initiated programs, the window is reduced to about 3x4 inches showing in the middle of the rest of my regular Virtual Box window. I am seeing only the upper right hand of the screen output of what I would normally see. Please help.

I've seen How do I install Guest Additions in a VirtualBox VM?

But, none of these answers works in 14.04.


Source: (StackOverflow)

How to select video quality from youtube-dl?

I have installed youtube-dl in my 14.04.

I can download video by following command,

$ youtube-dl [youtube-link]

But I want to know how to select available pixel quality of youtube video(i.e 1080p, 720p, 480p, etc).

In software description they said it's possible(shown in image below), but how to do..

ss


Source: (StackOverflow)

Diskfilter writes are not supported > What triggers this error?

This message occurs when leaving the Grub menu and before the Ubuntu splash screen.

How do I fix the problem to clear the message?

And what doe is it mean?

error:  Diskfilter writes are not supported

System boots and seems to work just fine.


Source: (StackOverflow)

How to enable exFAT in Ubuntu 14.04

I just installed Ubuntu 14.04 and I can't mount my exFAT HDD.

I get the following error:

Unable to access “SeagateHDD”
Error mounting /dev/sdb1 at /media/me/SeagateHDD: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdb1" "/media/me/SeagateHDD"' exited with non-zero exit status 1:
stdout: `FUSE exfat 1.0.1
'
stderr: `ERROR: `Operating Systems' has invalid checksum (0x281c != 0x2450).
'

I installed exfat-utils and exfat-fuse using apt-get but no luck. I also tried the repository ppa:relan/exfat but I got:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 fuse-exfat : Depends: fuse-utils (>= 2.7) but it is not installable
E: Unable to correct problems, you have held broken packages.

Can anybody give me a hint? All my backed up data is on that HDD.

EDIT:

The output of $ sudo apt-cache policy exfat-fuse is:

exfat-fuse:
  Installed: (none)
  Candidate: 1.0.1-1
  Version table:
     1.0.1-1 0
        500 http://ppa.launchpad.net/relan/exfat/ubuntu/ trusty/main amd64 Packages

Tried it on a Linux Mint and had the same problem. Also tried mounting it on a Mac and it worked perfectly so the data is not corrupted.

EDIT2:

It appears it was a problem with my HDD which apparently I unplugged from the USB without unmonting and it had a checksum error. What I did was I plugged it on my Mac and the Mac automatically did a fsck_exfat which fixed the problem and I could load it on Ubuntu as well. I think a similar thing could be achieved on Ubuntu as well, but I don't know with which tools.


Source: (StackOverflow)

Ubuntu 14.04 LTS live USB boot error (gfxboot.c32:not a valid COM32R image)

I downloaded Ubuntu 14.04 (64 bit) lts. I made a bootable usb stick. But I keep receiving this error message upon booting:

SYSLINUX 4.04 EDD 20110518 Copyright (C) 1994-2011 H. Peter Anvin et al
Unknown keyword in configuration file: gfxboot.c32: not a COM32R image

Source: (StackOverflow)

Keyboard locks in IntelliJ IDEA on Ubuntu 14.04

Couldn't you help me with hell of a wierd issue? I use Intellij IDEA 13 on Ubuntu 14.04 and from time to time my keyboard completely (yep, completely, it's not about shortcuts) locks in IDEA. I still can do anything I want in IDEA with my mouse, also I can use the keyboard everywhere else except IDEA. And it can be fixed only by restarting IDEA so far.

Can anybody give a hint, please?


Source: (StackOverflow)

Mcrypt extension is missing in 14.04 server for mysql

The php mcrypt extension on ubuntu 14.04 shows that it is installed properly, but phpmyadmin says:

 The mcrypt extension is missing. Please check your PHP configuration.

My current php config is here. If you need anymore information, please contact me through the comments.

$ sudo apt-get install php5-mcrypt
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    php5-mcrypt is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Source: (StackOverflow)

unable to play HEVC files on ubuntu 14.04 LTE

I have tried VLC and totem players but they are not working.
I then searched and re-installed the VLC with latest version available, this time I am getting a green layer on the video.
Any help?


Source: (StackOverflow)