The VMware Tools installation after Easy Install Ubuntu 14.4.1

Components:

  • MacBook Pro with Sierra 10.12.6 as Host
  • VMWare Fusion PRO 10.1.1
  • Ubuntu Desktop 64-bits 14.4.1 LST as Guest

Problem description:
I have installed Ubuntu using Easy Install. After powering on the VM I can’t install VMware Tools. The option is grey/unavailable.

Observation:
The CD-ROM can not be connected because of one error.

Solution:
Open VMware Fusion application > right click on the corresponding VM > Show in Finder > right click on the corresponding .vmwarevm file > Show Package Contents:

  • If you have autoinst.flp in the VM directory – rename
  • If you have autoinst.iso in the VM directory – rename

Where these files are present and/or configured in the vmx – the virtual machine will be launched in automatic installation mode that prevents the connection files iso vmware-tools

VMware Tools Installation

From VMware Fusion application Menu > Virtual Machine > Reinstall VMware Tools > Install
Follow install window indications for further installation inside Ubuntu OS.

Enjoy!

Install FreeRadius on Ubuntu VM

Before starting

Install Free Radius

  • Update Ubuntu VM
silvia@ubuntu :~$ sudo apt-get update
  • Install freeradius. I will install also freeradius-mysql to play with mysql later.
silvia@ubuntu :~$ sudo apt-get install freeradius freeradius-mysql
  • Get into root mode
silvia@ubuntu:~$ sudo -i
root@ubuntu:~#
  • I like vim
root@ubuntu:~# vim /etc/freeradius/users 
The program 'vim' can be found in the following packages:
* vim
* vim-gnome
* vim-tiny
* vim-athena
* vim-gtk
* vim-nox
Try: apt-get install <selected package>
root@ubuntu:~# apt-get install vim

[...]

root@ubuntu:~#

Test PAP subscriber

The first step to getting any authentication working in FreeRADIUS is to configure PAP, or clear-text passwords. Even though many deployments will end up using additional authentication protocols, PAP is the simplest and easiest to configure. And as we will see later, once PAP is configured, many other authentication protocols become simple, too.

In this example, we will configure PAP using the users file. The users file is a flat-text file that allows many common policies to be implemented. It is simple to use, easy to edit, and does not require any additional effort to configure databases like LDAP or SQL. It is therefore the ideal configuration file to use when starting to deploy a new server.

To configure PAP authentication, we must tell the server about a particular user, in this case bob. We must also tell the server what the users “known good” password is, in this case hello. This “known good” password will be used to validate the password entered by the user, and sent to FreeRADIUS by the NAS or AP. If the passwords match, then FreeRADIUS will return an Access-Accept packet. If the passwords do not match, then FreeRADIUS will return an Access-Reject packet.

  • Add a test user
root@ubuntu:~# vim /etc/freeradius/users 
silvia Cleartext-Password := "password"

#
# Please read the documentation file ../doc/processing_users_file,
# or 'man 5 users' (after installing the server) for more information.
#
# This file contains authentication security and configuration
# information for each user. Accounting requests are NOT processed
# through this file. Instead, see 'acct_users', in this directory.
#
# The first field is the user's name and can be up to
# 253 characters in length. This is followed (on the same line) with
# the list of authentication requirements for that user. This can
# include password, comm server name, comm server port number, protocol
# type (perhaps set by the "hints" file), and huntgroup name (set by
# the "huntgroups" file).
#
# If you are not sure why a particular reply is being sent by the
# server, then run the server in debugging mode (radiusd -X), and
# you will see which entries in this file are matched.
#
[...]
  • Enter debug mode
root@ubuntu:~# freeradius -X
FreeRADIUS Version 2.1.12, for host x86_64-pc-linux-gnu, built on Jul 26 2017 at 15:30:42
Copyright (C) 1999-2009 The FreeRADIUS server project and contributors. 
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.

[...]

radiusd: #### Opening IP addresses and Ports ####
listen {
 type = "auth"
 ipaddr = *
 port = 0
Failed binding to authentication address * port 1812: Address already in use 
/etc/freeradius/radiusd.conf[240]: Error binding to port for 0.0.0.0 port 1812

Obs: Get normal error as the service is already running

root@ubuntu:~# netstat -unpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:7682 0.0.0.0:* 929/dhclient 
udp 0 0 127.0.0.1:18120 0.0.0.0:* 50902/freeradius
udp 0 0 0.0.0.0:1812 0.0.0.0:* 50902/freeradius
udp 0 0 0.0.0.0:1813 0.0.0.0:* 50902/freeradius
udp 0 0 0.0.0.0:1814 0.0.0.0:* 50902/freeradius
udp 0 0 0.0.0.0:68 0.0.0.0:* 929/dhclient 
udp 0 0 0.0.0.0:47222 0.0.0.0:* 50902/freeradius
udp6 0 0 :::23210 :::* 929/dhclient
  • Test the created user
root@ubuntu:~# radtest silvia password localhost 0 testing123
Sending Access-Request of id 231 to 127.0.0.1 port 1812
 User-Name = "silvia"
 User-Password = "password"
 NAS-IP-Address = 127.0.1.1
 NAS-Port = 0
 Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=231, length=20
  ^---- This text means that authentication succeeded.

 OBS: With the default configuration in Version 2.x, and the above users file entry, the following authentication types will just work:

  • PAP
  • CHAP
  • MS-CHAP
  • EAP-MD5
  • EAP-MSCHAPv2
  • Cisco LEAP

Install Ubuntu Server on Fusion PRO

Software

  • VMWare Fusion PRO 10.0.1
  • Ubuntu package: ubuntu-14.04.1-server-amd64.iso

How to install a fresh Ubuntu Server

  • Open VMware Fusion > New > Install from disc or image > [ Continue ]
  • Drag and Drop the Ubuntu Image ubuntu-14.04.1-server-amd64.iso already stored into your computer > [ Continue ]
  • Use Easy Install (checked), Display Name: your_name, Account Name: ubuntu_user, Password: ubuntu_password, Confirm Password: ubuntu_password > [ Continue ]
  • [ Customize Settings ] > Save As: custom_name > [ Save ]
  • [ Finish ]
  • From menu chose Virtual Mashine > Setings…
  • Processors & Memory: 1 vCPU, 4G RAM, Advanced Options and check Enable hypervisor applications in this virtual machine
  • Existing NIC used for internet connectivity will be mapped to eth0: Network Adapter > Share with my Mac
  • New NIC used for other purposes will be mapped to eth1: [ Add Device ] >  Network Adapter > vmnet3
  • Delete Camera
  • Delete Printer
  • Power ON the VM and wait for the easy installation. Chose eth0 as the Primary network interface.

Connect using SSH >> ERROR

Check ifconfig

silvia@ubuntu :~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:5f:59:4b 
 inet addr:172.16.226.135 Bcast:172.16.226.255 Mask:255.255.255.0
               ^-- got this IP address form Fusion DHCP
 inet6 addr: fe80::20c:29ff:fe5f:594b/64 Scope:Link
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:86448 errors:0 dropped:0 overruns:0 frame:0
 TX packets:11662 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000 
 RX bytes:118763956 (118.7 MB) TX bytes:1141495 (1.1 MB)

lo Link encap:Local Loopback 
 inet addr:127.0.0.1 Mask:255.0.0.0
 inet6 addr: ::1/128 Scope:Host
 UP LOOPBACK RUNNING MTU:65536 Metric:1
 RX packets:34 errors:0 dropped:0 overruns:0 frame:0
 TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:0 
 RX bytes:2632 (2.6 KB) TX bytes:2632 (2.6 KB)

When trying to connect using ssh you will get an error. This is normal as ssh server is not installed.

Murgescus-MacBook-Pro:~ silvia$ ssh silvia@172.16.226.135

ssh: connect to host 172.16.226.135 port 22: Connection refused

Murgescus-MacBook-Pro:~ silvia$

Install a ssh-server

  • Update repositories
silvia@ubuntu :~$ sudo apt-get update
  • And again
silvia@ubuntu :~$ sudo apt-get upgrade
  • Install ssh-server
silvia@ubuntu :~$ apt-get install openssh-server

Connect using SSH >> SUCCESS

Murgescus-MacBook-Pro:~ silvia$ ssh silvia@172.16.226.135
The authenticity of host '172.16.226.135 (172.16.226.135)' can't be established.
ECDSA key fingerprint is SHA256:YCEkSF7rhHph60SRWGbfhHm2lRau5wUpPgjH2VqzMhA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.16.226.135' (ECDSA) to the list of known hosts.
silvia@172.16.226.135's password:
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-32-generic x86_64)

* Documentation: https://help.ubuntu.com/
Last login: Wed Dec 13 06:07:12 2017
silvia@ubuntu:~$

Do you need to configure the network adapters? Find here the solution.

Ubuntu VM Network Configuration

At the moment, my Ubuntu VM is already created with default configuration. Next, I will have to make some changes and connect the Ubuntu VM to the following networks:

Network Connected Device Device Port Info IP
vmnet3 vMX – Ubuntu Server eth0 OoB MNG Net 192.168.83.10
vmnet4 vMX – Ubuntu Server eth1 Intelink with VLANs 172.16.109.10
vmnet5 vMX – Ubuntu Server eth2 Intelink with VLANs 192.168.50.10

Software

  • Ubuntu 14.04.1 LTS
  • VMWare Fusion 10.0.1 Pro

Procedure

1. Create the needed networks into VMWare Fusion using Network GUI.

2. From Fusion application, click Ubuntu VM, go to Virtual Machine > Settings… and add the created networks.

3. Login to Ubuntu VM from Fusion console.

silvia@vMX-ubuntu:~$ sudo -i
[sudo] password for silvia:

4. Check the network setting.

root@vMX-ubuntu:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:9e:bb:5b  
          inet6 addr: fe80::20c:29ff:fe9e:bb5b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:185 errors:0 dropped:0 overruns:0 frame:0
          TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:18483 (18.4 KB)  TX bytes:14165 (14.1 KB)
eth1      Link encap:Ethernet  HWaddr 00:0c:29:9e:bb:65  
          inet6 addr: fe80::20c:29ff:fe9e:bb65/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3596 (3.5 KB)  TX bytes:3596 (3.5 KB)
virbr0    Link encap:Ethernet  HWaddr 52:54:00:07:ea:ed  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

4. Change default configuration for eth0 by deleting DHCP setting and adding the static setting. Note: eth0 is connected to vmnet3.

 root@vMX-ubuntu:~# cat /etc/network/interfaces
 # This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).

# The loopback network interface
 auto lo
 iface lo inet loopback

# The primary network interface
 auto eth0
 iface eth0 inet dhcp static
 address 192.168.83.10
 netmask 255.255.255.0
 network 192.168.83.0
 broadcast 192.168.83.255
 gateway 192.168.83.1

# The secondary networks interface
 auto eth1
 iface eth1 inet manual

5. Restart Ubuntu VM. It didn’t work for me to restart the interface or networking process.

6. When the Ubuntu VM is UP again, check the interface

silvia@vMX-ubuntu:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:5b
inet addr:192.168.83.10 Bcast:192.168.83.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe9e:bb5b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:201 errors:0 dropped:0 overruns:0 frame:0
TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19908 (19.9 KB) TX bytes:16815 (16.8 KB)

7. Configure eth1 and eth2 network interfaces connected to vmnet4 and vmnet5.

silvia@vMX-ubuntu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.83.10
netmask 255.255.255.0
network 192.168.83.0
broadcast 192.168.83.255
gateway 192.168.83.1



# The secondary networks interface
auto eth1
iface eth1 inet static
address 172.16.109.10
netmask 255.255.255.0
network 172.16.109.0
broadcast 172.16.109.255
gateway 172.16.109.1

# The secondary networks interface
auto eth2
iface eth2 inet static
address 192.168.50.10
netmask 255.255.255.0
network 192.168.50.0
broadcast 192.168.50.255
gateway 192.168.50.1

8. Restart the VM and check again the network configuration.

silvia@vMX-ubuntu:~$ ifconfig | grep -A 1 eth
eth0 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:5b 
inet addr:192.168.83.10 Bcast:192.168.83.255 Mask:255.255.255.0
--
eth1 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:65 
inet addr:172.16.109.10 Bcast:172.16.109.255 Mask:255.255.255.0
--
eth2 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:6f 
inet addr:192.168.50.10 Bcast:192.168.50.255 Mask:255.255.255.0