Не удается установить openssh-сервер: useradd: не удается заблокировать / etc / gshadow

При попытке установить openssh-сервер в моей системе я получил следующие ошибки:

root@user-desktop:/home/user# sudo apt-get install openssh-server

Reading package lists... Done
Building dependency tree

Reading state information... Done

The following extra packages will be installed:
  ssh-import-id

Suggested packages:

  rssh molly-guard openssh-blacklist openssh-blacklist-extra monkeysphere

The following NEW packages will be installed:

  openssh-server ssh-import-id

0 upgraded, 2 newly installed, 0 to remove and 706 not upgraded.

Need to get 346 kB of archives.

After this operation, 881 kB of additional disk space will be used.

Do you want to continue [Y/n]? Y

Get:1 http://ph.archive.ubuntu.com/ubuntu/ precise-updates/main openssh-server amd64 1:5.9p1-5ubuntu1.4 [339 kB]

Get:2 http://ph.archive.ubuntu.com/ubuntu/ precise/main ssh-import-id all 2.10-0ubuntu1 [6,598 B]

Fetched 346 kB in 5s (59.8 kB/s) 

Preconfiguring packages ...

Selecting previously unselected package openssh-server.

(Reading database ... 147510 files and directories currently installed.)

Unpacking openssh-server (from .../openssh-server_1%3a5.9p1-5ubuntu1.4_amd64.deb) ...

Selecting previously unselected package ssh-import-id.

Unpacking ssh-import-id (from .../ssh-import-id_2.10-0ubuntu1_all.deb) ...

Processing triggers for ureadahead ...

ureadahead will be reprofiled on next reboot

Processing triggers for ufw ...

Processing triggers for man-db ...

Setting up openssh-server (1:5.9p1-5ubuntu1.4) ...

Creating SSH2 RSA key; this may take some time ...

Creating SSH2 DSA key; this may take some time ...

Creating SSH2 ECDSA key; this may take some time ...

useradd: cannot lock /etc/gshadow; try again later.

adduser: `/usr/sbin/useradd -d /var/run/sshd -g nogroup -s /usr/sbin/nologin -u 229 sshd' returned error code 10. Exiting.

dpkg: error processing openssh-server (--configure):

 subprocess installed post-installation script returned error exit status 1

Setting up ssh-import-id (2.10-0ubuntu1) ...

Errors were encountered while processing:
 openssh-server

E: Sub-process /usr/bin/dpkg returned an error code (1)
2
задан 14 June 2017 в 09:59

1 ответ

Существует ли все еще adduser выполнение процесса?

можно проверить это использование следующей команды:

ps -ef | grep useradd

Если так, можно уничтожить его использование:

sudo killall -9 useradd

Вам, вероятно, придется удалить файлы блокировки, потому что useradd был прерван и поэтому не мог удалить файлы блокировки самостоятельно:

sudo rm -f /etc/passwd.lock /etc/gshadow.lock

Теперь установка попытки с помощью apt-get снова.

0
ответ дан 14 June 2017 в 09:59

Другие вопросы по тегам:

Похожие вопросы: