How do I recover login after installing xdm?

I can't login to FreeBSD after installing xdm. I used 'root' as the user when I changed ttys
file. As I log back in using single user mode, there is no text editor that I can use to change it back to its normal condition.
How to make myself loginable to the system again?
Thanks
Jack
 
Boot to single user mode then:
Code:
fsck -y
mount -u /
mount -a -t ufs
swapon -a
After that the editors should be available and you should be able to edit /etc/ttys.
 
Thanks Expert SirDice, it is okay now.
But how do I avoid login failure after installing xdm, is the 'root' account the key?
Thanks
Jack
 
Try logging in with a 'regular' user account. See if that works. But I don't think XDM prevents root from logging in, not recommended but it should work.

Did you perhaps install x11/xorg-minimal instead of x11/xorg? The latter contains the default window manager TWM. If it's not installed you will have to install an alternative and make sure it's started from your ~/.xinitrc (or was it ~/.xsession, symlink the two to make sure).
 
SirDice said:
{ "lightbox_close": "Close", "lightbox_next": "Next", "lightbox_previous": "Previous", "lightbox_error": "The requested content cannot be loaded. Please try again later.", "lightbox_start_slideshow": "Start slideshow", "lightbox_stop_slideshow": "Stop slideshow", "lightbox_full_screen": "Full screen", "lightbox_thumbnails": "Thumbnails", "lightbox_download": "Download", "lightbox_share": "Share", "lightbox_zoom": "Zoom", "lightbox_new_window": "New window", "lightbox_toggle_sidebar": "Toggle sidebar" }
HkEy2.png
port" href="http://www.freshports.org/

Permission changed 777 to ttys
Login as other user
Change the file
Can't login still.
HkEy2.png
">

Permission changed 777 to ttys
Login as other user
Change the file
Can't login still.
HkEy2.png
 
adamk said:
Explain what you mean by "unable to login." Does the graphical login screen not come up? Does X work if you don't use xdm?

When I type the user name on the graphical login screen and password, it says the username/password is not correct. When I change it back (tyvs, off xdm), I can login thru the text login prompt.
Thanks
Jack
 
Dear SirDice,
I have the default keyboard layout, as far as I recall, I did not change anything when I installed the system.
Thanks
Jack
 
Hi Jack,

The login process is handled by xdm. So try restarting xdm, and login via X as a normal user. If that fails, log back in as root via the console and tell us what the following show.

Run this:
Code:
grep "xdm:" /var/log/messages

Then look in:
  1. /var/log/xdm.log; and
  2. $HOME/.xsession-errors for that user
for any error messages indicating any reason for a login error.

If that provides no leads, we would expect this to show no differences:
Code:
diff /usr/local/share/examples/xdm/xdm-config /usr/local/lib/X11/xdm/xdm-config

Finally, it may help for us to see the output of the following:
Code:
ls -laR /usr/local/lib/X11/xdm

Cheers,
 
I start commenting out the Xconsole line of the Xsetup_0 file.
It works for "root" and it doesn't work for other accounts. (can't login)
And The system becomes very unstable
 
If works for root than it is probably a permission problem, even if it is still not clear to me what the problem is. You cannot login as normal user into the console (text-mode), into the display manager, or what? Please provide also the logs information as suggested in a previous post.
 
Here is the xdm.log
I don't have an .xsession-errors file in my $HOME/ directory
This is just the root one
 

Attachments

  • xdm.txt
    1.4 KB · Views: 236
  • xsession-errors.txt
    27 bytes · Views: 202
  • diff.txt
    77 bytes · Views: 211
Code:
xdm info (pid 1524): sourcing /usr/local/lib/X11/xdm/Xsetup_0
/usr/local/lib/X11/xdm/Xsetup_0: !#/usr/local/bin/bash: not found

Install shells/bash. If it's installed open that file, the first line should begin with '#!' not '!#'.
 
I've got his however. This is the returned message after I typed in the login name and password
 

Attachments

  • login_fail.png
    login_fail.png
    17.5 KB · Views: 499
Hi Jack,

As SirDice points out, the xdm log shows a serious error in the file /usr/local/lib/X11/xdm/Xsetup_0. You must correct this (but see below).

The logs you posted suggest to me that there's been a fair bit of hackery to the standard X11 setup. I can't see what version of FreeBSD you are running, but it seems odd to me that Xsetup_0 is running a bash script (I would expect /bin/sh).

Mine (which is admittedly old) looks like this, and unless you have a good reason, yours probably should too:
Code:
#!/bin/sh
# $Xorg: Xsetup_0,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail

Also the diff you sent of xdm-config shows "DisplayManager*authorize" has been set "false". I would expect this to be "true" on a clean system. The default xdm-comfig is a really good place to start. So unless you know better, you should (as root):

Code:
cp -p /usr/local/lib/X11/xdm/xdm-config /usr/local/lib/X11/xdm/xdm-config.bad
cp /usr/local/share/examples/xdm/xdm-config /usr/local/lib/X11/xdm/xdm-config
While we are here, you should check that rest of the files in /usr/local/lib/X11/xdm for modifications. Investigate anything you find with this:
Code:
cd /usr/local/share/examples/xdm/
for f in *
do
  echo "=== $f"
  diff $f /usr/local/lib/X11/xdm/$f
done

Cheers,
 
Back
Top