CAD Server

From Team 449 Wiki

The CAD server is a DigitalOcean server we rent to host our CAD files for collaborative editing, because Autodesk Vault, A360, and GrabCAD Workbench all have problems and we thought we could do better. The URL is fs.team449.cf.

How To Use

Creating an Account

To make an account, politely ask the current system administrator (if you don't know who this is, it's probably the person who talks about how much better Linux is the most) to make you one. Usernames are formatted as the first two letters of your first name followed by your entire last name, adding more letters of the first name if necessary to avoid a duplicate. Passwords must be at least 10 characters, and include at least one of each of the following:

  • Uppercase letter
  • Lowercase letter
  • Number
  • Non-alphanumeric character

When an administrator first makes your account, they'll email you a random 10-character password you can use to initially log on. Make sure to change your password immediately after!

Changing your Password

First, log on to the server. If you can use a unix terminal, cygwin, or minGW, just type ssh username@fs.team449.cf, replacing username with your username as described above, and enter your password when prompted. If you don't have any of those, download and install PuTTY. Enter fs.team449.cf as the Host Name and keep SSH selected for the connection type. Click "Open," then enter your username and password when prompted.

Once logged on, type smbpasswd to change your password. Enter your current and desired passwords when prompted, then type exit to log off of the server. Your password has now been changed!

Connecting to the Server

Picture of where the "Map Network Drive" button is.

This part must be done from Windows. Open File Explorer and click on "This PC," then click "Map Network Drive" (pictured). Set the folder to \\fs.team449.cf\fileshare and keep everything else as the default, then click "Finish." Enter your username and password in the box that pops up, and make sure to check off the "Remember my credentials" box. You are now connected to the server!

Using the Server

It behaves like any other folder on your computer, so just go ahead and start using it!

How to View

Follow the instructions in "Connecting to the Server," but with the username as viewer and the password as toor.

How To Administrate

Instructions on how to do admin stuff.

Creating an Account

When a user politely asks you to make an account for them, first make a unix account for them on the server using sudo adduser --shell /bin/rbash username, and enter a randomly generated password that meets the specs described above for the initial password. The --shell /bin/rbash part makes the user's shell Restricted Bash, which prevents them from using cd or any commands outside of PATH. More info here. However, Restricted Bash isn't very restricted by default, because bash is in the default PATH, so the user can just run bash and get an unrestricted shell. Because we only want the user to be able to run smbpasswd, use sudo nano /home/username/.bashrc to edit their bashrc and add export PATH=/usr/local/pwchange to the end. /usr/local/pwchange currently contains only a symlink to /usr/bin/smbpasswd, but you can add more commands to it if you want. Make the .bashrc immutable using sudo chattr +i /home/username/.bashrc so it can't be edited at all. This setup was inspired by this Unix & Linux Stack Exchange post.

Next, set up the user's Samba account with sudo smbpasswd -a username. Use the same random password from before as the Samba password. Use sudo usermod -a -G public username to give them default permissions.

To allow a user to access the Samba share, add them to the public group with sudo usermod -G public -a username.

Finally, enable password login for ssh for the new user. Edit the ssh config with sudo nano /etc/ssh/sshd_config. Scroll down to the part that says

Match User chrwang,nogleason,[some other names]
    PasswordAuthentication yes

Add the new user's name to the end of the list of names. Finally, reload the ssh settings with sudo service ssh reload, and email the new user their username and password.