/dev/random running out

In Linux /dev/random is a special file which serves high quality pseudo random numbers. This implementation collects entropy from events originating from the keyboard, mouse, disk and system interrupts.(refer this document) So when there are no such events, the entropy pool is empty, reads from /dev/random will block until additional environmental noise is gathered. This explains your problem. To fill the entropy pool you can press keys on keyboard. On a VM this can be troublesome offcourse.

On the other note a truly random number generator uses Hardware random number generator which generates random numbers from physical processes.These processes include microscopic phenomena that generate a low-level, statistically random “noise” signal, such as thermal noise or the photoelectric effect or other physical phenomena. These processes are, in theory, completely unpredictable, and the theory’s assertions of unpredictability are subject to experimental test.

A hardware random number generator typically consists of a transducer to convert some aspect of the physical phenomena to an electrical signal, an amplifier and other electronic circuitry to increase the amplitude of the random fluctuations to a macroscopic level, and some type of analog to digital converter to convert the output into a digital number, often a simple binary digit 0 or 1. By repeatedly sampling the randomly varying signal, a series of random numbers is obtained.

The Hardware Random Number Generator gathers environmental noise from device drivers and other sources into an entropy pool. From this entropy pool random numbers are created. When read, the /dev/random device will only return random bytes within the estimated number of bits of noise in the entropy pool.

Some implementations of Hardware RNG are explained in kernel doc and information on a device.

A counterpart to /dev/random is /dev/urandom (“unlocked”/non-blocking random source) which reuses the internal pool to produce more pseudo-random bits. This means that the call will not block, but the output may contain less entropy than the corresponding read from /dev/random.

So if your intent is not to generate CSPRNG(Cryptographically secure pseudorandom number generator), you should use /dev/urandom.

To solve this issue you can use the /dev/urandom and create a symlink to it:

Windows shares in Ubuntu server

Until now I have always used SMBFS as protocol to mount Windows shares on a Ubuntu server.
SMBFS (with webmin) is an easy way to add all your current shares and make them read/writable with the root user. But because of security reasons I’m stepping back on using the root user everywhere, this brought me to the problem that I only could read on my SMBFS mounts.

After some internet searching I came across a solution: CIFS

CIFS is a different protocol then SMBFS but it can also mount Windows Shares with ease.
It is also a lot more secure because we are saving the share credentials in a secure file instead of putting them in fstab file.

The following is tested with Ubuntu Server 10.04 & Windows Server 2008 R2

1) Open a Terminal and enter the following:
Code:

The output will be something similar to:
Code:

Make a note of the uid and gid.

2) Make the following entry in your /etc/fstab file :

If you don’t need a user name and password to access a samba share add this line:
Code:

If you need a user name and password to access a samba share add this line and proceed to the next 2 steps:
Code:

Modify the server_name, share_name, mount_path, UID value and GID value to suit your environment.

4) Add the following in /root/.smbcredentials:
Code:

Where myusername and mypassword is the user name and password to access the samba share.

5) Set the following permission to /root/.smbcredentials
Code:

6) Now try to login as a particular user and see whether you able to read and write to the share.

Reference: CIFS man page

Ubuntu Remote Desktop Client – Black cursor on 2008 R2 & Win 7

From Ubuntu 8.04 there is a bug that makes your cursor black when using a remote desktop (rdesktop) to a session on a Windows server 2008 R2 or Windows 7. This can be solved by adding the patch repo and updating your software.

or when not installed