Login problems are those where your machine does, in fact, boot to the expected Welcome screen or login prompt, but refuses to accept the proper username/password, or accepts them but then does not behave properly (fails to start the graphical desktop, produces errors, drops to a command line, etc.).
This usually occurs because NLD is configured to use network authentication or directory services and, for some reason, is unable to retrieve results from its configured servers. The root user, as the only local user, is the only user that can still log in to these machines. The following are some common reasons why an NLD machine might appear functional but be unable to process logins correctly:
In all cases which do not involve external network problems, the solution is to reboot the system into a single-user mode and repair the configuration before booting again into operating mode and attempting to log in again.
To boot into single-user mode:
Reboot the system.
The NLD boot screen appears, offering you a prompt.
Enter 1 at the boot prompt to make the system boot into single-user mode.
You are prompted for a username and password.
Enter the username and password for root.
Make all the changes you need.
Boot into the full multiuser and network mode by entering telinit 5 at the command line.
This is by far the most common problem that NLD machines present, because there are many reasons this can occur. First and foremost, determine that the user’s username and password do, in fact, work on other (properly functioning) machines. If so, then see if another user can log in to the misbehaving machine. If another user can log in without difficulty, or if root can log in, then log in and examine the /var/log/messages file. Locate the timestamps which correspond to the login attempts and determine if PAM has produced any coherent error messages.
The following are some common reasons why authentication for a particular user might fail on a specific machine:
To locate the cause of the login problems, try the following:
Try to log in via a console (Ctrl+Alt+F1).
If this is successful, the blame cannot be put on PAM or the directory server the user's home is hosted on, because it is possible to authenticate this user on this machine. Try to locate any problems with the X Window system or the desktop (GNOME or KDE).
If the user's home directory has been used with another Linux distribution, remove the Xauthority file in the user's home. Use a console login via Ctrl+Alt+F1 and issue the rm .Xauthority command as this user, then try a graphical login again.
If graphical login still fails, try a console login via Ctrl+Alt+F1 and try to start an X session on another display (the first one (:0) is already in use) by entering
startx -- :1
This should bring up a graphical screen and your desktop as well. If it doesn't, check the log files of the X Window system (/var/log/XFree86.displaynumber.log) or the log file for your desktop applications (.xsession-errors in the user's home directory) for any irregularities.
If the desktop still cannot start up, it is probably due to corrupt configuration files; therefore, refer to A user cannot log in to GNOME Desktop; the NLD machine accepts the username and password but does not bring up the GNOME Desktop properly. or A user cannot log in to KDE Desktop; the NLD machine accepts the username and password but does not bring up the KDE Desktop properly..
If this is true for a particular user, it is likely that the user’s GNOME configuration files have become corrupted. Some symptoms might include the keyboard failing to work, the screen geometry becoming distorted, or even the screen coming up as a bare gray field. The important distinction is that if another user logs in, the machine works normally. If this is the case, then it is likely that the problem can be fixed relatively quickly by simply moving the user’s GNOME configuration directory to a new location, which causes the GNOME Desktop to initialize a new one. Although the user is forced to reconfigure his GNOME Desktop settings, none of his data is lost.
Log in as root.
Change to the user’s home directory.
Move the user's GNOME config directories to a temporary location by entering
nld-machine:~user/ # mv ./gconf ./gconf-ORIG-RECOVER nld-machine:~user/ # mv ./gnome2 ./gnome2-ORIG-RECOVER
Log out.
Let the user log in, but do not let them run any applications.
Recover the user's individual application configuration data (including, most importantly, the Evolution™ e-mail client data) by copying the ~/gconf-ORIG-RECOVER/apps/ directory back into their new ~/gconf directory as follows:
nld-machine:~user/ # cp -a ./gconf-ORIG-RECOVER/apps ./gconf/
If this causes the login problems to reoccur, it might be time to attempt to recover only the critical application data and force the user to reconfigure the remainder of the applications.
There are several reasons why a KDE Desktop might not allow users to log in. Corrupted cache data can cause login problems as well as corrupt KDE Desktop configuration files.
Cache data is used at desktop startup to increase startup performance. If these data are corrupted, startup is slowed down or fails entirely. Removing them forces the desktop startup routines to start from scratch. This takes more time than a normal startup, but the data is intact after this and the user can log in.
To remove the cache files of the KDE Desktop, issue the following command as root:
nld-machine:~ # rm -rf /tmp/kde-user /tmp/socket-user
Replace user with the actual username. Removing these two directories removes just the corrupted cache files, so no real data is harmed.
Corrupted desktop configuration files can always be replaced by the initial configuration files. If you want to recover the user's adjustments, replace them after restoring the configuration.
To replace a corrupted desktop configuration by the initial configuration values, proceed as follows:
Log in as root.
Change to the user's home directory by entering
nld-machine:~ # cd /home/user
Move the KDE configuration directory and the .skel files to a temporary location by entering
nld-machine:~user/ # mv .kde .kde-ORIG-RECOVER nld-machine:~user/ # mv .skel .skel-ORIG-RECOVER
Log out.
Let the user log in to this machine.
After the desktop has started successfully, copy the user's own configurations adjustments back into place by entering
user@nld-machine:~ > cp -a .kde-ORIG-RECOVER/share .kde/share
HINT:If the user's own adjustments caused the login to fail and continue to do so, repeat the procedure as described above but don't copy the .kde/share directory.