Network Questions

How do I setup CGI on my web page?

This question has been answered in the CIS UserGuide. Please see the section on UserGuide/WebPages.

Why don't you have an FTP server?

FTP is a very old protocol. It was designed before security considerations were a major part of protocol design. As such, passwords to the FTP server are sent in plain text---any clever user on the network can snoop your packets and steal your password. This would allow that user to gain access to your account, which is an unacceptable violation of our security.

We actually do provide an FTP server, but only for anonymous access. Some faculty have published files on the FTP server, which is available at ftp.cis.ksu.edu.

If you need to access your home directory from a remote location, there are two different methods for doing so. See the documentation in the CIS Systems UserGuide for Remote Access or in the FrequentlyAskedQuestions about how to access your home directory from a non-CIS computer.

How do I backup data to CIS?

To setup an automated backup from a linux or OS X laptop to CIS filesystems follow these steps:

First, make sure that you have a $HOME/bin directory on your laptop.

mkdir -p $HOME/bin
chmod u+rwx $HOME/bin

Next, copy this script to $HOME/bin/backup_to_cis.sh on your laptop. You will need to change the DIRECTORIES variable to whichever directories from your home directory on your laptop that need backed up.::

   1 #!/usr/bin/env bash
   2   
   3 ###
   4 # Script to backup laptop home directory files to CIS home directory
   5 ###
   6  
   7 # These are the directories that will be backed up from your homedir.
   8 # For example: If I have ~/docs and ~/proposals that I want backed up,
   9 #              I would change the next line to:
  10 #              DIRECTORIES="docs proposals"
  11 DIRECTORIES="dir1 dir2"
  12   
  13 test_exists () {
  14     which $1 > /dev/null 2>&1
  15     return $?
  16 }
  17   
  18 die () {
  19     echo $1
  20     exit 1
  21 }
  22   
  23 CIS_BACKUP_DIR="~/laptop_backups"
  24 CIS_SERVER="linux.cis.ksu.edu"
  25 RSYNC_OPTS="--archive --delete --rsh=ssh --quiet"
  26 UTILITIES="ssh rsync"
  27   
  28 # Ensure that ssh and rsync exist
  29 for UTILITY in ${UTILITIES}; do
  30     test_exists ${UTILITY} || die "Couldn't find ${UTILITY}"
  31 done
  32   
  33 # Ensure that each directory exists locally; then copy it to CIS
  34 for DIR in ${DIRECTORIES}; do
  35     if [ ! -d ${HOME}/${DIR} ]; then
  36         echo "Could not find ${HOME}/${DIR} -- skipping"
  37     else
  38         rsync ${RSYNC_OPTS} ${HOME}/${DIR} ${CIS_SERVER}:${CIS_BACKUP_DIR}/
  39     fi
  40 done

Next, make sure your script is executable.::

chmod u+rwx $HOME/bin/backup_to_cis.sh

Next, setup ssh keys as outlined in this FAQ.

Next, setup a cronjob to run this script. Run crontab -e as your user and add the following line if you want to backup at midnight every day. Run man 5 crontab if you want a different time and do not know the crontab format.

0 0 * * * ${HOME}/bin/backup_to_cis.sh

Obviously, your laptop will need to be turned on with a network connection for a backup to take place. You can always run the backup script manually by executing this command.

$HOME/bin/backup_to_cis.sh

To setup an automated backup from a Windows laptop to CIS filesystems follow these steps:

First, you'll need to create a directory in your homedir to save backups. On a Windows lab machine, this is your U:. If you are doing this remotely, you can connect to our network remotely by following this document.

Map your remote homedir to your local computer by going up one directory, right Finally, customize whatever additional options you'd like for your backup click on your username and choose Map Network Drive.

After you've created your backup folder in your homedir, you will now need to download and install Cobian Backup.

Follow the on-screen instructions for installing Cobian Backup on your personal workstation.

After Cobian Backup is installed, a moon image should appear in your system tray (on the bottom right of your screen), or you may simply launch it by going to your `Start Menu > All Programs > Cobian Backup > Cobian Backup Interface`.

Click on the Tasks pane on your left to active that tab. Right click inside it's window and choose Add Task. Name your task in the Task Name field and modify other settings in that tab as needed. Click on the Files tab on the top of that window to add the files you'd like backed up on the CIS Systems. In the destination section under the Files tab click on the open folder (Add A Directory) and choose the folder inside the mapped network drive you just created.

Next you can schedule your backups via the Schedule tab (Daily, Weekly, Monthly, etc.).

Finally, customize whatever additional options you'd like for your backup if you deem them necessary. Click OK.

Your backups will now run according to the schedule you indicated on the Schedule tab automatically (providing your computer is turned on during that time period).

How do I forward my CIS email somewhere else?

This question has been answered in the CIS UserGuide. Please see the section on UserGuide/Email.

How do I use HTTP authentication?

To setup password authentication for a directory in your personal web space follow these steps from a linux shell (you will want to change passwordProtectedDir to whatever name you want and use your own usernames). <your_home_dir_path> is the full path to your home directory. If you don't know what this is, use the finger command from the command prompt of any linux host ("finger <eid>", where <eid> is your eID).

   1 cd ~/public_html/
   2 mkdir passwordProtectedDir
   3 cd passwordProtectedDir
   4 htpasswd -c .htpasswd user_who_gets_access
   5 htpasswd .htpasswd other_user
   6 cat << EOF > ~/public_html/passwordProtectedDir/.htaccess
   7 AuthType Basic
   8 AuthName "Checking Password"
   9 AuthUserFile <your_home_dir_path>/public_html/passwordProtectedDir/.htpasswd
  10 Require valid-user
  11 EOF

Now create any files you want in the directory and set permissions appropriately.

chmod o+rx ~/public_html/passwordProtectedDir
chmod o+r ~/public_html/passwordProtectedDir/*.*

If you would like your files to only be password protected off-campus, use this command to make your htaccess file.

cat << EOF > ~/public_html/passwordProtectedDir/.htaccess
AuthType Basic
AuthName "Checking Password"
AuthUserFile <your_home_dir_path>/public_html/passwordProtectedDir/.htpasswd
Require valid-user
Order Allow,Deny
# This restricts access without a password to the KSU network
Allow from 129.130.0.0/16
# This restricts access without a password to the CIS network
#Allow from 129.130.8.0/22
Satisfy any
EOF

Why am I getting 500 Interal Server Error on all my scripts?

We use programs named suexec and suphp to make sure that all of your scripts run as you. This allows your scripts to access files that would normally be private and inaccessible by the web server. However, for security these programs will not allow your scripts to run unless the permissions set on your files and on the directories containing them are safe.

For CGI scripts, you must make sure the following are true:

1. Your script must be stored in your home directory in the subdirectory named public_html/cgi-bin. You cannot place your scripts anywhere else.

2. You must make sure that your home directory, the public_html directory, and the cgi-bin directory are not group or other writable:

3. Finally, you must make sure your scripts are executable, but not group or other writable:

4. If you have problems, try checking the end of the logs for additional information while pressing reload on your browser:

For PHP scripts, you must make sure the following are true:

1. Your script must be stored in your home directory under the directory named public_html or a subdirectory of that directory.

2. You must make sure that your home directory, the public_html directory, and every directory above your PHP script is accessible but not group or other writable:

3. Finally, you must make sure your scripts are readable, but not group or other writable:

4. If you have problems, try checking the end of the logs for additional information while pressing reload on your browser:

How do I setup ssh keys?

To setup ssh keys for authentication between CIS Linux and Solaris hosts, follow these steps

chmod go-w ~
cd ~/.ssh/
chmod 700 .
ssh-keygen -t dsa
cat id_dsa.pub >> authorized_keys2
chmod 600 *

How do I access the wireless network in Nichols?

The CIS Wireless network is now managed by the K-State Computing and Network Services (CNS) department. To gain access to the network, you will need to have a valid eID and follow these instructions listed on the CNS website.

How do I access the wired network in Nichols?

The CIS wired network only allows registered hosts to connect. If you wish to use your own system on the CIS network, please fill out the "Register a Host" form on the self-service website:

Once you fill out the form, support staff will be alerted to your request. Most requests are handled within the hour if submitted during business hours (8AM-5PM, Monday-Friday).

We do have a temporary DHCP pool of 10 addresses so that you can connect long enough to fill out the form. Once you have received notice that your registration request has been approved, please reboot or restart your network connection so that you can free up the temporary IP for the next user.

How do I access the campus VPN?

Please see the K-State page on how to download, install, and use the VPN client for off-campus connection.

http://www.k-state.edu/infotech/networks/vpn/