NoMachine Disk Quota Exceeded

When connecting to the CADE machines with NoMachine, the most common error a user may receive is “Disk Quota Exceeded”. This message occurs when a user has used up the allotted space in their home directory (default currently 16GB).

To fix this, you’ll need to grab an SSH session to a lab machine and delete some data that way.

Using Windows Powershell or a Mac Terminal, run “ssh username@lab1-1.eng.utah.edu”
Then run “du -xhad1 | sort -hr | head -n 20”
This will summarize your disk usage with depth=1. This will take a few minutes. Be patient!

For example:

  [user@lab1-1 ~]$ du -xhad1 ~ | sort -hr | head -n 10
  16.0G /home/user
  13.4G /home/user/Downloads
  1014M /home/user/cs4200
  468M /home/user/eclipse-workspace
  190M /home/user/.mozilla
  162M /home/user/.eclipse
  128M /home/user/.nx
  82M /home/user/PycharmProjects
  44M /home/user/Videos
  38M /home/user/Pictures

Here we can see that we’re using 16.0GB of space total. That’s our entire quota. Of the 16.0G, 13.4G is from the Downloads directory.

Let’s see what’s using the space in our Downloads directory.

 [user@lab1-1 ~]$ du -xhad1 ~/Downloads | sort -hr | head -n 10
  11G /home/user/Downloads/dataset.zip
  2.4G /home/user/Downloads/DogVideo.mp4
  12M /home/user/Downloads/Never Gonna Give You Up.mp3

Ah! that dataset we downloaded last semester is still in our Downloads directory. Let’s delete it.

 [user@lab1-1 ~]$ rm /home/user/Downloads/dataset.zip

If you need to delete a directory (and all contents within), add the recursive and force options.

 [user@lab1-1 ~]$ rm -rf /home/user/cs4200

You may also need to purge your NoMachine cache, as it may have gotten corrupted if NoMachine ran out of space while running.

 [user@lab1-1 ~]$ rm -rf /home/user/.nx

How do I configure 2FA for CADE?

When connecting to the CADE Linux machines from on campus or the VPN, you may connect as usual with a password or an SSH key. When connecting from off campus, you’ll need both your CADE password and a one time code(2nd Factor Authentication).

To register an OTP app, log into the CADE machines from on-campus or the VPN and:

1. Go to Applications > CADE > Configure 2FA or from a terminal run configure-2fa.sh. This will display a QR Code on the screen.

2. Using the Duo app (or any other OTP app) scan the QR Code, where you will be asked to enter a 6-digit code.*

3. When remoting in from off campus, you will be prompted to enter your password, and then the OTP code on the next prompt.

NOTE: There is a bug in the Duo app. When initially registering the code, if it says that your code is invalid, close the Duo app and wait until the minute switches (or ~60 secs), then reopen the app and type the code again. This is only relevant during the initial setup.

What ports are open on the CADE Linux Machines?

The CADE Linux machines (lab1 and lab2) only allow incoming connections on ports 22 and 2100-2120.

This means that we allow incoming SSH connections (22), and allow students to host servers on 2100-2120.

How do i set or change the default group on my account?

You must already be a member of said group to change to it as your primary GID.
Use the command ‘groups’ to see what groups you’re a member of, first in the list is primary.

[warthogs@lab1-23 ~]$ groups
csugrad mech_adm telerobotics mechoffice mechprof mediashare src cs6090 cei manu

To change your primary GID for your current session, run the command ‘newgrp’ followed by the name of the group:
[warthogs@lab1-23 ~]$ newgrp telerobotics
[warthogs@lab1-23 ~]$ groups
telerobotics csugrad mech_adm mechoffice mechprof mediashare src cs6090 cei man

If you want the change to persist, either add the command to your login script or contact us and request that we change your accounts primary GID.

How do i share a folder or files with another user or group?

Once logged in to a linux machine, open a Terminal and you’ll issue a few commands. By default, you start in your home directory (/home/username) and it may appear with a prompt to the left of the cursor indicating that (a user’s ‘home’ may be represented by the ‘~’ char).
If you don’t have a directory to share, create one with something like:

[warthogs@lab1-23 ~]$ mkdir TeamSamba

The directory inherits the default permissions, in this case rwx (read-write-execute for the owner, your username; read-execute for group; read-execute for everyone/all users:
[warthogs@lab1-23 ~]$ ls -ld TeamSamba/
drwxr-xr-x 2 warthogs csugrad 4096 Oct 9 12:47 TeamSamba/

To verify the groupname for setting the directory permissions, find out which groups you’re a member of:
[warthogs@lab1-23 ~]$ groups
csugrad telerobotics mediashare src cs6090 cei manu

And assign one to the directory:
[warthogs@lab1-23 ~]$ chgrp telerobotics TeamSamba
[warthogs@lab1-23 ~]$ ls -ld TeamSamba/
drwxr-xr-x 2 warthogs telerobotics 4096 Oct 9 12:47 TeamSamba/

Finally, set the permissions so the group can write files, but no other users can see in the directory:
[warthogs@lab1-23 ~]$ chmod 2770 TeamSamba/
[warthogs@lab1-23 ~]$ ls -ld TeamSamba/
drwxrws— 2 warthogs telerobotics 4096 Oct 9 12:47 TeamSamba/

See ‘man chmod’ or ‘man chgrp’ for syntax details and more information.

Can I get a MySQL database?

Yes, we have MySQL (mysql.eng.utah.edu) available for student use.

To request a database, send an e-mail to opers@eng.utah.edu and let us know you need one. We will create it and likely place a file in your home directory with the database name and your login credentials.

If you place website files in your .public_html directory, you can make calls to the db, and thus access it from anywhere via eng.utah.edu/~username.

Can I change my default shell from ‘tcsh’?

Yes, login to the PCE User Tools page, click the ‘User Modify’ link. There, you can change your ‘Linux Login Shell’ to point to another (ie, csh, bash, zsh, …).

How do I add the list of CADE Lab machines to my list of ‘known_hosts’?

Download the known_hosts file from the ssh directory and place it in the appropriate directory or add the necessary lines to your existing file. Some software may require the list to be in a specific format or that the file be renamed.
www.cade.utah.edu/downloads

How can we get a group for sharing files for our project?

We would be happy to create a group for you – unfortunately, we can’t allow users to create their own. Send an e-mail to opers@eng.utah.edu with the following information:
– The group-owners UNID or CADE username
– The preferred name for the group (please keep it short, and we will likely concatenate for ease; you can use ‘groupsearch’ to see if it exists already).
– Optional: the UNID’s or CADE usernames of the other team members. The owner can modify the member list later at-will via command-line (groupmodify) or web-page (www.cade.utah.edu/groupmod).

Once we reply with the details, the group owner may use the command ‘groupmodify’ to edit the member list.
Somewhere in your home directory, create a directory and assign the group privileges using chgrp and chmod. See the man pages if you need more details.

NOTE: We also offer an SVN Repository service if multiple users could be modifying files at the same time.

How does one fix a “Firefox is already running” error on a Linux machine?

When logged in to a Linux lab machine or compute server, you may get the following error when opening Firefox:
“Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.”

This may occur even though no evidence of Firefox running can be found.
To remedy this, open a Terminal and run the command: foxlock

It’s a script we wrote that will remove the necessary files from your .mozilla folder and allow you to open Firefox once again.