Configure automatic login on Solaris and OpenSolaris with GDM

From ezUnix
Jump to: navigation, search
                                    pdf_icon.png Download this article as a single PDF document 

Introduction

This Howto is for x86 only and was tested on Solaris 10 and OpenSolaris Nevada.


Configure GDM

First you need to create a config file for GDM called gdm.conf or cutom.conf in /etc/X11/gdm/ Edit it if it is already there and add there following:

   AutomaticLoginEnable=true
   AutomaticLogin=oper

Where oper is the user you want to log in automatically.


Configure PAM

Edit /etc/pam.conf and add there following:

       gdm-autologin auth  required    pam_unix_cred.so.1
       gdm-autologin auth  sufficient  pam_allow.so.1

The file /usr/lib/security/pam_allow.so.1 is not currently included with Solaris 10. It can be copied from one of the Nevada releases, for the appropriate platform, and installed in /usr/lib/security.

You may also soft link pam_allow.so to pam_allow.so.1

# cd /usr/lib/security/ ; ln -s pam_allow.so.1 pam_allow.so


~/.Xclients

Edit .Xclients in the oper's home directory and add there:

    /usr/dt/bin/dtwm

Then

#chmod 755 .Xclients


GDM's session config

Edit .dmrc in oper's home dir and add there following:

   [Desktop]
   Session=default


Disable CDE login and enable GDM

This may be needed only on Solaris 10:

   # svcadm disable cde-login
   # svcadm enable gdm2-login

Xinitrc

The .xinitrc in user's home dir is not used so if you need to run any custom commands for your WM then you need to copy your old .xinitrc to .profile


That's all folks. Marcin


<comments />

hoapoulpaws said ...
03:07, 23 December 2010 (CET)
I am impressed with your web resource.