Operating System - HP-UX
1753481 Members
3996 Online
108794 Solutions
New Discussion юеВ

Re: How to disable desktop CDE login ?

 
arfani
New Member

How to disable desktop CDE login ?

Hi All,

Does anyone know how to disable desktop CDE login? Need your help please.

Regards,
Arfan
3 REPLIES 3
Mridul Shrivastava
Honored Contributor

Re: How to disable desktop CDE login ?

By default, most systems are set-up to be network configured. CDE will not allow you to login if you have a standalone machine configured to run on a network. Therefore, to disable the network configuration on an HP-UX 10.X/11.X system, please implement the following steps:

NOTE: Some of these steps may have already been implemented on your system.
RESOLUTION
Log into the system as the root user via Command Line Mode.

Click on the Options push-button on the CDE login banner and select "Command Line Login".


Remove (rm) or rename (mv) each of the following files:

/etc/resolv.conf
/etc/nsswitch.conf
/etc/X?hosts

Where the '?' in /etc/X?hosts is the number of the display where the X server appears. For example, if the X server appears on display:0, then you would need to remove or rename the /etc/X0hosts file.)


Make a back-up copy of the following user customizable files :

mv /var/adm/inetd.sec /tmp/inetd.sec
mv /etc/hosts /etc/hosts.orig
mv /etc/rc.config.d/netconf /tmp/netconf
mv /etc/rc.config.d/netdaemons /tmp/netdaemons
mv /etc/rc.config.d/namesvrs /tmp/namesvrs

NOTE: The back-up copy of the netconf file SHOULD NOT be in the /etc/rc.config.d/ directory!


Replace the user customized files with the system default files in the /usr/newconfig/... directories:

cp /usr/newconfig/var/adm/inetd.sec /var/adm/inetd.sec
cp /usr/newconfig/etc/hosts /etc/hosts
cp /usr/newconfig/etc/rc.config.d/namesvrs /etc/rc.config.d/namesvrs
cp /usr/newconfig/etc/rc.config.d/netconf /etc/rc.config.d/netconf
cp /usr/newconfig/etc/rc.config.d/netdaemons /etc/rc.config.d/netdaemons


Run hostname at the command prompt to determine what your hostname is currently set to.


Edit the /etc/hosts file to include the loopback IP address (127.0.0.1), the hostname of the machine, localhost and loopback:


127.0.0.1 hostname_of_machine localhost loopback
For example, if the hostname of the machine was "gracie", the line would appear as follows:


127.0.0.1 gracie localhost loopback
NOTE: This should be the only line in this file.


Edit the /etc/rc.config.d/netconf file to include the following variable assignment:

HOSTNAME="myname" ## where "myname" is the name of the machine.
IP_ADDRESS[0]="127.0.0.1"
DHCP_ENABLE[0]=0 ## Found only in HP-UX 10.20 or later.

The remaining lines in this file should be commented out and/or removed.


Copy the /usr/dt/config/Xservers file to the /etc/dt/config/ directory:

cp /usr/dt/config/Xservers /etc/dt/config/Xservers


Edit the /etc/dt/config/Xservers file to turn off access control by adding a '-ac' option to the last line of this file:


* Local local@console /usr/bin/X11/X :0 -ac
Copy the /usr/dt/config/Xconfig file to the /etc/dt/config/ directory:

/usr/dt/config/Xconfig /etc/dt/config/Xconfig


Uncomment the following line in the /etc/dt/config/Xconfig file:


Dtlogin*authorize: False
Re-load the X server:

/usr/dt/bin/dtconfig -reset


Reboot the system:

/sbin/shutdown -r -y now
or
/sbin/reboot


============================================================================

The following steps are not required, but they will speed up boot time:

Edit the /etc/rc.config.d/nfsconf file to include each of the following variable assignments:

NOTE: These variables are not listed in the exact order they appear in the file:

NFS_CLIENT=0
NFS_SERVER=0
PCNFS_SERVER=0
AUTOMOUNT=0
START_MOUNTD=0


Set SNMP_HPUNIX_START=0 in the /etc/rc.config.d/SnmpHpunix file.

Set SNMP_MASTER_START=0 in the /etc/rc.config.d/SnmpMaster file.

Set SNMP_MIB2_START=0 in the /etc/rc.config.d/SnmpMib2 file.

Edit the /etc/fstab file and comment out (or remove) any lines that contain "nfs".

The system (and CDE) should now restart and work normally without being connected to a network. To restore you system to the default network-configuration set-up, you will need to undo each of these steps.
Time has a wonderful way of weeding out the trivial
Robert-Jan Goossens
Honored Contributor

Re: How to disable desktop CDE login ?

Hi Arfan,

Disable CDE completly on this system?

# dtconfig -d
# init 2
# init 3


# dtconfig -e
will enable CDE to run again.

Regards,
Robert-Jan
Wim Rombauts
Honored Contributor

Re: How to disable desktop CDE login ?

The most simple way to prevent the dektop login from starting at system boot time :
Edit /etc/rc.config.d/desktop en change the line "DESKTOP=CDE" to "DESKTOP=".
The dtlogin login screen will no longer be started, although you have the option to start CDE manually by executing /usr/dt/bin/dtrc or /usr/dt/bin/dtlogin.
If you also want to prevent a manual startup, the previous response is the best way to go.