Difference between revisions of "Client Recipe"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
(After 4 years, I have updated this page for CentOS 7 (we no longer use Fedora). Please view the History page if you absolutely must know the old client method.)
Line 1: Line 1:
 
A simple ''n''-step process to set up a client lickety-split:
 
A simple ''n''-step process to set up a client lickety-split:
# Install Fedora in the typical fashion, skipping the steps for creating a default user and network authentication
 
## When configuring network authentication, check LDAP configuration, and download the certificate from http://nuclear.unh.edu/~maurik/unh_physics_ca.crt
 
# Log in as root
 
# Disable NetworkManager if it hasn't already been disabled. (hint: chkconfig)
 
# Run system-config-network
 
# If there isn't one already, add an ethernet device on eth0.
 
# If this client is not in the server room (and therefore not going to use a VLAN), skip to the next full step
 
## Choose to statically set the IP address to an available local number (10.0.0.*)
 
## Give the device the alias "farm".
 
## Make sure it has onboot=yes so that it automatically comes up
 
## Run <code>vconfig add eth0 2</code> to create a virtual device "eth0.2" while the network is up. Might need to run <code>ifup eth0</code>.
 
## Use system-config-network to add an ethernet device to eth0.2
 
# Alias it "unh"
 
# Make sure it has onboot=yes in the so that it automatically comes up
 
# Choose to statically set the IP address to whatever was registered for the client
 
# Set the gateway to 132.177.88.1
 
# Under the general network configuration "DNS" tab, put the appropriate IPs of einstein and roentgen for primary and secondary DNS (local for farm as the primary connection, unh for unh as the primary connection)
 
# Save the changes made with system-config-network
 
# If a virtual device was added:
 
## Open /etc/sysconfig/network-scripts/ifcfg-unh in a text editor
 
## Add the line <code>VLAN=yes</code>, and save
 
# If there are any more devices already present, disable, remove or configure them as well. Whatever you do, don't leave them defaulted to DHCP mode, otherwise their existence will change /etc/resolv.conf !
 
# Run gtk-authconfig
 
# Check "Enable LDAP Support" under the "User Information" and "Authentication" tabs
 
# Click "Configure LDAP..."
 
# The base DN is dc=physics,dc=unh,dc=edu and the server is einstein.unh.edu.
 
# "Download CA Certificate" doesn't ever seem to work, so get "unh_physics_ca.crt" from einstein and put it in /etc/openldap/cacerts" (hint: <code>scp</code>).
 
# Click OK in LDAP Settings.
 
# Click OK in authconfig
 
## If this is an Ubuntu workstation, /etc/openldap is actually /etc/ldap, or something like that. It'll make sense when you see it.
 
# Disable SELinux
 
# Install autofs
 
# Copy the appropriate content into the [[Autofs Configuration Files]]
 
## If this is an Ubuntu workstation, you most likely need to install the package nfs-common.
 
# Reboot
 
  
'''All systems should have [[iptables]] and [[denyhosts]] setup!'''
+
== CentOS 7 ==
 
+
# Run the CentOS installer disk.
 
+
## Localization:
== Fedora 11 and 12 Howto ==
+
### Date & Time: Americas/New York
From livecd:
+
### Keyboard: English (US)
* Double click "install to hard drive."
+
### Language Support: English (United States)
* Provide a hostname.
+
## Software:
* Use default partitioning unless this is a special case.
+
### Installation Source: Local Media
** This will make /boot the first partition, LVM the second, and / and swap on the LVM.
+
### Software Selection: Select GNOME Desktop with the following Add-ons:
* Wait for the install to finish.
+
#### GNOME Applications
* Reboot, remove cd, boot into new install
+
#### Internet Applications
* On "Create User," select network login.
+
#### Office Suite and Productivity
** Select "Enable LDAP support" under "User Information."
+
#### Compatibility Libraries
** Click "Configure LDAP."
+
## Installation Destination: Disk to be installed (Note that Automatic Partitioning is suggested. You may need to reclaim space if the drive is not new).
** Check "Use TLS to encrypt connections," download CA certificate, and give the URL: http://nuclear.unh.edu/~maurik/unh_physics_ca.crt
+
## Network and Hostname:
** LDAP search base DN: dc=physics,dc=unh,dc=edu
+
### For wired clients:
** LDAP server: ldap://einstein.unh.edu
+
#### 1. First select "Configure" in the bottom right.
** Check "Enable LDAP support" under "Authentication."
+
#### 2. In the General tab, select "Automatically connect to this network when it is available".
** Click OK
+
#### 3. In the IPv4 Settings tab, select Manual for the Method.
* On Date and Time, go to the Network Time Protocol tab and chekc "enable network time protocol."
+
#### 4. Add an appropriate IP, Netmask, and Gateway.
* Sending profile is optional
+
#### 5. Add the appropriate DNS servers.
* GDM will come up, Ctrl-Alt-F2 to get to a commandline. Log in as root.
+
#### 6. Add "unh.edu" as the Search Domain.
* <code>system-config-network</code>
+
#### 7. Save the configuration.
** Configure eth0
+
### (TODO: Figure out how to set up wireless clients with OpenVPN.
*** Name: UNH
+
### Set the hostname in the bottom left corner (this should include the domain, ex; 'benfranklin.unh.edu')
*** Static IP
+
## Select Begin Installation
*** Netmask: 255.255.252.0
+
## Set the root password.
*** Gateway: 132.177.88.1
+
## Create a user with the following credentials:
*** Primary DNS: 132.177.88.52
+
### Full name: Test
*** Secondary DNS: 132.177.128.99
+
### Username: test
* Edit /etc/sysconfig/networking/profile/default/hosts
+
### Uncheck 'Make this user administrator'
** Add "132.177.88.52 einstein einstein.unh.edu" to the file.
+
### Check 'Require a password to use this account'
* Edit /etc/sysconfig/networking/profile/default/ifcfg-unh
+
### Set a secure password (even though this account is temporary, the computer may still be vulnerable to network attacks).
** Change the file so that it has ONBOOT=yes
 
* <code>service NetworkManager restart</code>
 
* Make everyone happy: <code> yum install vim emacs</code>
 
* <code>yum install autofs</code>
 
* <code>scp nuclear.unh.edu:/etc/auto.* /etc/ </code> (remember, nuclear is roentgen!)
 
* <code>service autofs start; chkconfig --add autofs</code>
 
* Edit /etc/openldap/ldap.conf
 
** Change the URI line to "URI ldap://einstein.unh.edu/" if it isn't already.
 
* Edit /etc/ldap.conf
 
** Change the line with bind_policy to "bind_policy soft" in order to avoid lockups when einstein can't be reached.
 
* Edit /etc/sudoers
 
** Add "%domain_admins ALL=(ALL) ALL" right below "root ALL=(ALL) ALL"
 
* Edit /etc/sysconfig/selinux
 
** Change the line with SELINUX=enforcing to "SELINUX=disabled" because selinux is a pain.
 
* chkconfig sshd on
 
* reboot
 
You should now be good to go!
 
 
 
If you want rpmfusion for extra packages and proprietary drivers:
 
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm</code>
 
 
 
== Fedora 13 ==
 
 
 
The above instructions should work for Fedora 13 with one exception. It appears that unless NFS can do a DNS reverse lookup on a server's IP Address it will not work properly. I'm not sure why this changed from the previous version of Fedora, but what it means in practical terms is that home folders won't work correctly on Fedora 13 machines. They'll mount, but you'll have weird issues like browsers being unable to load saved profile information.
 
 
 
The simple fix for this is to add a line to /etc/hosts for the file server, so it should look something like this for machines in the server room:
 
 
 
10.0.0.240    npghome npghome.farm.physics.unh.edu
 
 
 
or this for machines outside the server room:
 
 
 
132.177.91.210    npghome npghome.unh.edu
 
 
 
 
 
It doesn't appear that there are problems with any of the other NFS mounts, but they haven't been tested extensively either. This is an issue we should watch if we begin upgrading workstations to Fedora 13.
 
 
 
== Ubuntu 9.04 Howto ==
 
 
 
It's best to not use Ubuntu 9.04 at this time. There are issues with binding as an anonymous user for password authentication. Autofs and getent password work fine with the following instructions, but without password authentication, the workstation is useless. If we were willing to set up a proxy user for ldap searching purposes, we could use Ubuntu, but I'm currently unwilling to do this, as I feel it's a security risk.
 
 
 
* Install as usual, making a user called "localuser" with the root password. We'll be deleting this account later.
 
* Log in as localuser
 
* System > Preferences > Network Connections
 
** Delete the connection "auto eth0"
 
** Add a connection, name it "unh", set the appropriate manual IP.
 
* sudo apt-get update
 
* sudo apt-get install libpam-ldap libnss-ldapd libnss-ldapd nss-updatedb libnss-db ldap-auth-client ldap-utils
 
** When asked, set the following:
 
ldap://einstein.unh.edu
 
dc=physics,dc=unh,dc=edu
 
on services, check off passwd, shadow, groups.
 
say no to making root the database admin
 
* cd /etc/ssl/certs
 
* wget http://nuclear.unh.edu/~maurik/unh_physics_ca.crt
 
* edit /etc/ldap.conf:
 
** bind_policy soft
 
** ssl start_tls
 
** tls_cacertdir /etc/ssl/certs
 
* sudo apt-get install autofs nfs-common
 
* sudo scp nuclear.unh.edu:/etc/auto.* /etc/ (remember nuclear is roentgen!)
 
* sudo service autofs restart
 
* sudo apt-get install openssh-server
 
* sudo service sshd restart
 

Revision as of 14:27, 7 August 2014

A simple n-step process to set up a client lickety-split:

CentOS 7

  1. Run the CentOS installer disk.
    1. Localization:
      1. Date & Time: Americas/New York
      2. Keyboard: English (US)
      3. Language Support: English (United States)
    2. Software:
      1. Installation Source: Local Media
      2. Software Selection: Select GNOME Desktop with the following Add-ons:
        1. GNOME Applications
        2. Internet Applications
        3. Office Suite and Productivity
        4. Compatibility Libraries
    3. Installation Destination: Disk to be installed (Note that Automatic Partitioning is suggested. You may need to reclaim space if the drive is not new).
    4. Network and Hostname:
      1. For wired clients:
        1. 1. First select "Configure" in the bottom right.
        2. 2. In the General tab, select "Automatically connect to this network when it is available".
        3. 3. In the IPv4 Settings tab, select Manual for the Method.
        4. 4. Add an appropriate IP, Netmask, and Gateway.
        5. 5. Add the appropriate DNS servers.
        6. 6. Add "unh.edu" as the Search Domain.
        7. 7. Save the configuration.
      2. (TODO: Figure out how to set up wireless clients with OpenVPN.
      3. Set the hostname in the bottom left corner (this should include the domain, ex; 'benfranklin.unh.edu')
    5. Select Begin Installation
    6. Set the root password.
    7. Create a user with the following credentials:
      1. Full name: Test
      2. Username: test
      3. Uncheck 'Make this user administrator'
      4. Check 'Require a password to use this account'
      5. Set a secure password (even though this account is temporary, the computer may still be vulnerable to network attacks).