安装新的Ubuntu 15.04后,即使未设置磁盘加密,启动程序也会要求输入密码


22

我在笔记本电脑中安装了全新的SSD,并全新安装了Ubuntu 15.04,没有使用任何系统加密(仅使用主目录加密)。但是,它在引导时仍然要求我输入密码(我只按Enter即可跳过):

http://i.imgur.com/yhtfLRd.jpg

此外,在执行全新安装后,升级程序包还会多次要求我输入密码,这Enter也会绕过。该程序是“ systemd-tty-ask-password-agent”,因此问题似乎出在systemd上。

终端中的相关消息:

Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none! 
update-initramfs: deferring update (trigger activated)

Broadcast message from root@username-XPS-13-9343 (Thu 2015-04-30 22:06:22 EDT):

Password entry required for 'Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none!' (PID 4027).
Please enter password with the systemd-tty-ask-password-agent tool!

运行升级的完整输出:

+username@username-XPS-13-9343:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  ca-certificates firefox gir1.2-gudev-1.0 libcurl3 libcurl3-gnutls
  libgudev-1.0-0 libnm-glib-vpn1 libnm-glib4 libnm-util2 liboxideqt-qmlplugin
  liboxideqtcore0 liboxideqtquick0 libpam-systemd libsystemd0 libudev1
  network-manager oxideqt-codecs systemd systemd-sysv tzdata udev
  usb-creator-common usb-creator-gtk wpasupplicant
24 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 47.9 MB/73.2 MB of archives.
After this operation, 2,989 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libudev1 amd64 219-7ubuntu4 [40.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main udev amd64 219-7ubuntu4 [929 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main systemd-sysv amd64 219-7ubuntu4 [14.0 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libpam-systemd amd64 219-7ubuntu4 [108 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libsystemd0 amd64 219-7ubuntu4 [73.8 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main systemd amd64 219-7ubuntu4 [3,531 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libcurl3-gnutls amd64 7.38.0-3ubuntu2.2 [172 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libcurl3 amd64 7.38.0-3ubuntu2.2 [180 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libgudev-1.0-0 amd64 1:219-7ubuntu4 [14.4 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libnm-util2 amd64 0.9.10.0-4ubuntu15.1 [134 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libnm-glib-vpn1 amd64 0.9.10.0-4ubuntu15.1 [14.4 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main libnm-glib4 amd64 0.9.10.0-4ubuntu15.1 [84.7 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main tzdata all 2015d-0ubuntu0.15.04 [178 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main ca-certificates all 20141019ubuntu0.15.04.1 [191 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main firefox amd64 37.0.2+build1-0ubuntu0.15.04.1 [40.1 MB]
Get:16 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main gir1.2-gudev-1.0 amd64 1:219-7ubuntu4 [5,564 B]
Get:17 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main wpasupplicant amd64 2.1-0ubuntu7.1 [768 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main network-manager amd64 0.9.10.0-4ubuntu15.1 [754 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main usb-creator-gtk amd64 0.2.67ubuntu0.1 [23.4 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main usb-creator-common amd64 0.2.67ubuntu0.1 [23.7 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu/ vivid-updates/main oxideqt-codecs amd64 1.6.5-0ubuntu0.15.04.1 [533 kB]
Fetched 47.9 MB in 1min 18s (613 kB/s)                                         
Preconfiguring packages ...
(Reading database ... 171469 files and directories currently installed.)
Preparing to unpack .../libudev1_219-7ubuntu4_amd64.deb ...
Unpacking libudev1:amd64 (219-7ubuntu4) over (219-7ubuntu3) ...
Setting up libudev1:amd64 (219-7ubuntu4) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
(Reading database ... 171469 files and directories currently installed.)
Preparing to unpack .../udev_219-7ubuntu4_amd64.deb ...
Unpacking udev (219-7ubuntu4) over (219-7ubuntu3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for systemd (219-7ubuntu3) ...
Setting up udev (219-7ubuntu4) ...
Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none! 
update-initramfs: deferring update (trigger activated)

Broadcast message from root@username-XPS-13-9343 (Thu 2015-04-30 22:06:22 EDT):

Password entry required for 'Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none!' (PID 4027).
Please enter password with the systemd-tty-ask-password-agent tool!

Processing triggers for initramfs-tools (0.103ubuntu15) ...
update-initramfs: Generating /boot/initrd.img-3.19.0-15-generic
(Reading database ... 171469 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_219-7ubuntu4_amd64.deb ...
Unpacking systemd-sysv (219-7ubuntu4) over (219-7ubuntu3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up systemd-sysv (219-7ubuntu4) ...
(Reading database ... 171469 files and directories currently installed.)
Preparing to unpack .../libpam-systemd_219-7ubuntu4_amd64.deb ...
Unpacking libpam-systemd:amd64 (219-7ubuntu4) over (219-7ubuntu3) ...
Preparing to unpack .../libsystemd0_219-7ubuntu4_amd64.deb ...
Unpacking libsystemd0:amd64 (219-7ubuntu4) over (219-7ubuntu3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libsystemd0:amd64 (219-7ubuntu4) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
(Reading database ... 171469 files and directories currently installed.)
Preparing to unpack .../systemd_219-7ubuntu4_amd64.deb ...
Unpacking systemd (219-7ubuntu4) over (219-7ubuntu3) ...
Processing triggers for dbus (1.8.12-1ubuntu5) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up systemd (219-7ubuntu4) ...
Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none! 
(Reading database ... 171469 files and directories currently installed.)
Preparing to unpack .../libcurl3-gnutls_7.38.0-3ubuntu2.2_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.38.0-3ubuntu2.2) over (7.38.0-3ubuntu2) ...
Preparing to unpack .../libcurl3_7.38.0-3ubuntu2.2_amd64.deb ...
Unpacking libcurl3:amd64 (7.38.0-3ubuntu2.2) over (7.38.0-3ubuntu2) ...
Preparing to unpack .../libgudev-1.0-0_1%3a219-7ubuntu4_amd64.deb ...
Unpacking libgudev-1.0-0:amd64 (1:219-7ubuntu4) over (1:219-7ubuntu3) ...
Preparing to unpack .../libnm-util2_0.9.10.0-4ubuntu15.1_amd64.deb ...
Unpacking libnm-util2:amd64 (0.9.10.0-4ubuntu15.1) over (0.9.10.0-4ubuntu15) ...
Preparing to unpack .../libnm-glib-vpn1_0.9.10.0-4ubuntu15.1_amd64.deb ...
Unpacking libnm-glib-vpn1:amd64 (0.9.10.0-4ubuntu15.1) over (0.9.10.0-4ubuntu15) ...
Preparing to unpack .../libnm-glib4_0.9.10.0-4ubuntu15.1_amd64.deb ...
Unpacking libnm-glib4:amd64 (0.9.10.0-4ubuntu15.1) over (0.9.10.0-4ubuntu15) ...
Preparing to unpack .../tzdata_2015d-0ubuntu0.15.04_all.deb ...
Unpacking tzdata (2015d-0ubuntu0.15.04) over (2015c-1) ...
Setting up tzdata (2015d-0ubuntu0.15.04) ...

Current default time zone: 'America/New_York'
Local time is now:      Thu Apr 30 22:20:06 EDT 2015.
Universal Time is now:  Fri May  1 02:20:06 UTC 2015.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

(Reading database ... 171469 files and directories currently installed.)
Preparing to unpack .../ca-certificates_20141019ubuntu0.15.04.1_all.deb ...
Unpacking ca-certificates (20141019ubuntu0.15.04.1) over (20141019) ...
Preparing to unpack .../firefox_37.0.2+build1-0ubuntu0.15.04.1_amd64.deb ...
Unpacking firefox (37.0.2+build1-0ubuntu0.15.04.1) over (37.0+build2-0ubuntu1) ...
Preparing to unpack .../gir1.2-gudev-1.0_1%3a219-7ubuntu4_amd64.deb ...
Unpacking gir1.2-gudev-1.0 (1:219-7ubuntu4) over (1:219-7ubuntu3) ...
Preparing to unpack .../wpasupplicant_2.1-0ubuntu7.1_amd64.deb ...
Unpacking wpasupplicant (2.1-0ubuntu7.1) over (2.1-0ubuntu7) ...
Preparing to unpack .../network-manager_0.9.10.0-4ubuntu15.1_amd64.deb ...
Unpacking network-manager (0.9.10.0-4ubuntu15.1) over (0.9.10.0-4ubuntu15) ...

Broadcast message from root@username-XPS-13-9343 (Thu 2015-04-30 22:20:19 EDT):

Password entry required for 'Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none!' (PID 15391).
Please enter password with the systemd-tty-ask-password-agent tool!

Preparing to unpack .../usb-creator-gtk_0.2.67ubuntu0.1_amd64.deb ...
Unpacking usb-creator-gtk (0.2.67ubuntu0.1) over (0.2.67) ...
Preparing to unpack .../usb-creator-common_0.2.67ubuntu0.1_amd64.deb ...
Unpacking usb-creator-common (0.2.67ubuntu0.1) over (0.2.67) ...
Preparing to unpack .../liboxideqt-qmlplugin_1.6.5-0ubuntu0.15.04.1_amd64.deb ...
Unpacking liboxideqt-qmlplugin:amd64 (1.6.5-0ubuntu0.15.04.1) over (1.5.5-0ubuntu1) ...
Preparing to unpack .../liboxideqtquick0_1.6.5-0ubuntu0.15.04.1_amd64.deb ...
Unpacking liboxideqtquick0:amd64 (1.6.5-0ubuntu0.15.04.1) over (1.5.5-0ubuntu1) ...
Preparing to unpack .../liboxideqtcore0_1.6.5-0ubuntu0.15.04.1_amd64.deb ...
Unpacking liboxideqtcore0:amd64 (1.6.5-0ubuntu0.15.04.1) over (1.5.5-0ubuntu1) ...
Preparing to unpack .../oxideqt-codecs_1.6.5-0ubuntu0.15.04.1_amd64.deb ...
Unpacking oxideqt-codecs:amd64 (1.6.5-0ubuntu0.15.04.1) over (1.5.5-0ubuntu1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu5) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.58ubuntu1) ...
Processing triggers for dbus (1.8.12-1ubuntu5) ...
Processing triggers for systemd (219-7ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for hicolor-icon-theme (0.14-0ubuntu1) ...
Setting up libpam-systemd:amd64 (219-7ubuntu4) ...
Setting up libcurl3-gnutls:amd64 (7.38.0-3ubuntu2.2) ...
Setting up libcurl3:amd64 (7.38.0-3ubuntu2.2) ...
Setting up libgudev-1.0-0:amd64 (1:219-7ubuntu4) ...
Setting up libnm-util2:amd64 (0.9.10.0-4ubuntu15.1) ...
Setting up libnm-glib-vpn1:amd64 (0.9.10.0-4ubuntu15.1) ...
Setting up libnm-glib4:amd64 (0.9.10.0-4ubuntu15.1) ...
Setting up ca-certificates (20141019ubuntu0.15.04.1) ...
Setting up firefox (37.0.2+build1-0ubuntu0.15.04.1) ...
Please restart all running instances of firefox, or you will experience problems.
Setting up gir1.2-gudev-1.0 (1:219-7ubuntu4) ...
Setting up wpasupplicant (2.1-0ubuntu7.1) ...
Setting up network-manager (0.9.10.0-4ubuntu15.1) ...
Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none! 

Broadcast message from root@username-XPS-13-9343 (Thu 2015-04-30 22:20:47 EDT):

Password entry required for 'Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none!' (PID 19822).
Please enter password with the systemd-tty-ask-password-agent tool!

Please enter passphrase for disk Crucial_CT250MX200SSD4 (cryptswap1) on none! 
Setting up usb-creator-common (0.2.67ubuntu0.1) ...
Setting up usb-creator-gtk (0.2.67ubuntu0.1) ...
Setting up oxideqt-codecs:amd64 (1.6.5-0ubuntu0.15.04.1) ...
Setting up liboxideqtcore0:amd64 (1.6.5-0ubuntu0.15.04.1) ...
Setting up liboxideqtquick0:amd64 (1.6.5-0ubuntu0.15.04.1) ...
Setting up liboxideqt-qmlplugin:amd64 (1.6.5-0ubuntu0.15.04.1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for ca-certificates (20141019ubuntu0.15.04.1) ...
Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
username@username-XPS-13-9343:~$ 

有人在这里发布了类似的问题,但这似乎与我未使用的OpenVPN有关。/etc/default/openvpn反正我没有文件。

如何解决此问题?


我从未使用过加密,在启动过程中很早就挂载了父目录/ home。您确定此时还不需要提供通行证。
黄狗2015年

我和您有同样的问题,我不介意在启动时键入密码,但在更新过程中必须输入密码10次很烦人
Kempe 2015年

如果对任何人/etc/fstab都有用,我的解决方案是注释掉常规交换分区并保留注释不留注释
Wolf

Answers:


9

这是一个已知问题,应尽快解决:

https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1447282

简而言之:在某些情况下,systemd无法正确识别加密的交换,并提示输入从未设置的密码。交换总是加密的,以防激活家庭加密,因为用户数据可能会被交换出来然后变得未加密。


感谢您的注意-我没有接受其他答案,以免误导他人。安全性对我来说非常重要,因此,如果您可以添加一些有关如何安全地逆转kempe提供的步骤(不破坏任何内容)的说明,那将非常好。现在有没有更安全的解决方法?当他们解决此问题时,它只会影响新安装还是现有安装?
timetofly 2015年

1
您将如何在我的答案结尾处的链接中对其进行扭转
Kempe 2015年

1
这个曾经修复过吗?我在15.10上,仍然有这个问题。
马特

在16.04 LTS中仍未修复。这个答案确实有对我有用的解决方法。

8

这不是正确的解决方案,正如克里斯蒂安在下面的评论中说的那样,这会使它的安全性降低。但是,如果加密不是您的优先事项,则可以使用此替代方法。

首先找到具有交换的分区

sudo fdisk -l
[sudo] password for kempe: 

Disk /dev/sda: 233,8 GiB, 251000193024 bytes, 490234752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B59D4149-AC8E-4B71-B51F-8926B2E82C14

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    409599    407552   199M EFI System
/dev/sda2     409640 253319775 252910136 120,6G Apple HFS/HFS+
/dev/sda3  253321216 269320191  15998976   7,6G Linux swap
/dev/sda4  269320192 490233855 220913664 105,3G Linux filesystem

就我而言,交换已开启 /dev/sda3

然后关闭交换

sudo swapoff -a

禁用cryptswap

sudo cryptsetup remove /dev/mapper/cryptswap1

删除/ etc / crypttab中的相应行。我那里只有一行,但您可能还有更多,因此请确保删除正确的行

sudo vim /etc/crypttab 

设置新的交换区(记住fstab输出)

sudo /sbin/mkswap /dev/sda3
sudo swapon /dev/sda3

最后修复fstab行

sudo vim /etc/fstab

替换/dev/mapper/cryptswap1/dev/sda3

启用和禁用加密交换-Ubuntu


谢谢!对我来说唯一的不同是对我而言/dev/mapper/cryptswap1不存在。我想知道是什么原因造成的。可能是15.04安装程序中的错误。
timetofly 2015年

是啊 我没有启用它至少
肯普

1
这个问题很危险!它实际上是在破坏安全性。交换空间时,交换空间也是随机加密的,因为用户数据可能会交换!实际上,systemd中似乎存在一个问题,即使对于随机加密的分区也提示输入密码,但是此解决方案打破了加密的概念!
基督教徒

你有 您可能没有注意到。当家庭被加密时,交换总是被加密。似乎是系统问题。应该没有提示输入密码,因为没有密码提示。由于重新启动后交换数据无关紧要,因此每次启动时都会随机生成encrpytion密钥。listings.launchpad.net/touch-packages/msg72437.html
基督教徒

1
是的,也许我只是没有注意到它,但是15.04中的行为带有密码问题,涉及您所做的所有事情,并且每个命令多次出现,非常令人讨厌,并且可能导致永久性的脑损伤……
Kempe

6

我可以通过以下步骤解决此问题:

在命令提示符下,运行 gnome-disks

查找哪个设备是您的交换驱动器。我的是/dev/sda3

ls -l /dev/disk/by-uuid/

查找与交换分区符号链接的ID

sudo vim /etc/crypttab

在以cryptswap1开头的行上,将UUID =…部分更改为/ dev / disk / by-id / ID-HERE。保存并重新启动。

如果仍然提示您输入密码,请运行:

sudo dd if=/dev/zero of=/dev/sdaX bs=512 count=20480

重新启动。


+1在16.04 LTS为我工作。我确实必须执行dd命令并再次重新启动。谢谢!

1

运行sudo fdisk -l以查找交换分区(即/ dev / sda6)

在/ etc / crypttab或sudo blkid/ dev / sda6中获取UUID (用交换替换设备)

sudo swapoff /dev/sda6

运行sudo mkswap -U UUID /dev/sda6(用交换替换UUID和设备)

附加,offset=1024到/ etc / crypttab中cryptswap行的末尾

将“ / dev / mapper / cryptswap1 none swap sw 0 0”添加到/ etc / fstab

sudo update-initramfs -u

sudo swapon -a

支票交换与 sudo systemctl status /dev/mapper/cryptswap


1

即使在Ubuntu 15.10上,该问题仍然存在。我临时提出了解决方案-关闭交换分区的加密(主目录仍处于加密状态)。在这种情况下,本指南对我有用。这个密码短语请求不再在引导系统和更新软件方面引起我的注意。

也许以后,我将恢复交换分区的加密(使用同一指南),当我知道该错误已修复时。


3
即使在Ubuntu 16.04 LTS上,该问题仍然存在!!!做了同样的事情,关闭了交换分区的加密。
dxvargas '16

0

最好的解决方案是停用(取消注释)fstab(而不是映射器)中的经典交换线。如果您随后重新启动并键入sudo swapon --summary,则应该在/ dev / dm-X(通常为0)上获得一个交换分区。如果是,请高兴cryptswap运行良好。


0

作为解决该错误的替代方法,可以将初始化过程切换到新贵,因为这是与systemd相关的错误。这里说新贵可以用作解决方法。

为此,最简单的方法是安装相应的软件包:

sudo apt-get install upstart-sysv

安装后,您仍然可以在grub的“ Ubuntu的高级选项”子菜单中使用systemd启动系统,并使用“ Ubuntu,使用Linux…(systemd)”选项启动。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.