[Bug 998437] Re: Can't log in on a tty

Andreas Raster 998437 at bugs.launchpad.net
Sat May 12 14:34:22 UTC 2012


Ok so I looked at agetty's source code and the problem comes from here:
/*
 * Do not allow the user to pass an option as a user name
 * To be more safe: Use `--' to make sure the rest is
 * interpreted as non-options by the program, if it supports it.
 */
static void check_username(const char* nm)
{
	const char *p = nm;
	if (!nm)
		goto err;
	if (strlen(nm) > 42)
		goto err;
	while (isspace(*p))
		p++;
	if (*p == '-')
		goto err;
	return;
err:
	errno = EPERM;
	log_err("checkname: %m");
}

... which is doing almost nothing. It must be that whatever is passed in
is so malformed that I get a 'Operation not permitted' error, because I
enter my username correctly and don't use dashes os spaces or something
longer then 42 characters.

Anyways I suspect that just a huge amount of garbage (along with my
username) is passed into that function because I have another problem
with some misbehaving usb devices since the upgrade to precise. I have
not reported that issue because I still have not really figured out what
is wrong. Something odd happens where every first boot my screen just
blinks and endlessly repeats some more or less random part of the boot
process (always right after initializing the usb subsystem). And every
second boot after that I can boot, but still get a lot of screen
blinking and lines of garbage printed out as if there is a key stuck on
my keyboard sending very foreign keycodes all the time.

So I guess that is the reason, and I just tried to unplug all my usb
devices (except keyboard and mouse) and rebooted and everything works
fine now. So it seems this bug is in fact caused by some error in the
kernels usb subsystem that is triggered by one of my usb devices.

** Changed in: util-linux (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/998437

Title:
  Can't log in on a tty

Status in “util-linux” package in Ubuntu:
  Invalid

Bug description:
  I have upgraded from 11.10 to 12.04 and just noticed that I can not
  log in on a tty. I can enter my username and when I press enter it
  waits for a moment and then goes straight back to the username prompt
  without ever asking for my password.

  Looking in /var/log/auth.log it seems this is caused by some kind of permissions problem:
  May 12 15:13:16 capcom getty[2774]: checkname: Operation not permitted

  My groups:
  ~> groups rakete
  rakete : rakete adm dialout cdrom audio video plugdev lpadmin admin sambashare

  and:
  ~> ls /dev/tty* -la
  crw-rw-rw- 1 root tty     5,  0 May 12 15:11 /dev/tty
  crw--w---- 1 root tty     4,  0 May 12 15:11 /dev/tty0
  crw-rw---- 1 root tty     4,  1 May 12 15:13 /dev/tty1
  crw--w---- 1 root tty     4, 10 May 12 15:11 /dev/tty10
  crw--w---- 1 root tty     4, 11 May 12 15:11 /dev/tty11
  crw--w---- 1 root tty     4, 12 May 12 15:11 /dev/tty12
  crw--w---- 1 root tty     4, 13 May 12 15:11 /dev/tty13
  crw--w---- 1 root tty     4, 14 May 12 15:11 /dev/tty14
  crw--w---- 1 root tty     4, 15 May 12 15:11 /dev/tty15
  crw--w---- 1 root tty     4, 16 May 12 15:11 /dev/tty16
  [...]

  Any suggestions how to fix this would be very welcome!

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: util-linux 2.20.1-1ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
  Uname: Linux 3.2.0-24-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.0.1-0ubuntu7
  Architecture: amd64
  Date: Sat May 12 15:23:11 2012
  EcryptfsInUse: Yes
  SourcePackage: util-linux
  UpgradeStatus: Upgraded to precise on 2012-04-05 (36 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/998437/+subscriptions




More information about the foundations-bugs mailing list