Skip to content

Instantly share code, notes, and snippets.

@omaciel
Last active August 29, 2015 14:01
Show Gist options
  • Save omaciel/2115b886b644409c4e28 to your computer and use it in GitHub Desktop.
Save omaciel/2115b886b644409c4e28 to your computer and use it in GitHub Desktop.
Configuring a 389-DS server with VNC access

Setting up a 389-DS Server

Installing needed pieces

Assuming you have a RHEL box:

# Subscribe box to get content
subscription-manager register --force --username=$USERNAME --password=$PASSWORD --autosubscribe

# Installing Desktop so that we can have Xorg and more flexibility than using TWM :)
yum groupinstall -y Desktop

# Installing 389 bits and VNC
yum install -y 389-ds openldap-clients tigervnc-server

# Setting up/configuring 389-DS
useradd dsuser

Configuration

Now, run the following command and accept all the defaults:

setup-ds-admin.pl

Turn on some services by default:

chkconfig dirsrv on
chkconfig dirsrv-admin on

The following command should tell you whether things worked out:

ldapsearch -x -b "dc=usersys,dc=redhat,dc=com"

Configuring VNC

Run the following commands:

sed -i -e 's/^# VNCSERVERS.*/VNCSERVERS="1:root"/' /etc/sysconfig/vncservers
sed -i -e 's/^# VNCSERVERARGS.*/VNCSERVERARGS[1]="-geometry 1024x768"/' /etc/sysconfig/vncservers

Now, run vncpasswd as root and set a password

Finally, get vncserver turned ON and iptables turned OFF for good measure:

chkconfig vncserver on
chkconfig iptables off
service vncserver start
service iptables stop

You probably want to reboot now. Once your system is back online, you should be able to use VNC to connect to $FQDN using display :1. Once connected, open a console and run:

389-console -a http://$(hostname):9830

Login as admin using the password you chose during the setup phase.

Using 389-DS Authentication

  • Login as the admin for your Satellite 6 system and select LDAP Authentication from the Administer drop-down menu.
  • Click the New authentication source button and fill out the form:
    • LDAP tab
      • Name:
      • Server: $FQDN_FOR_YOUR_389-DS_BOX
      • Port: 389
      • TLS: - [ ]
    • Account tab
      • Account username:
      • Account password:
      • Base DN: ou=People,dc=usersys,dc=redhat,dc=com
      • LDAP filter:
      • Automatically create accounts in Foreman: - [x]
    • Attribute mappings tab
      • Login name attribute: uid
      • First name attribute: givenName
      • Surname attribute: sn
      • Email address attribute: mail
      • Photo attribute:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment