Черный экран с мигающим курсором после нового сервера Ubuntu 16.04 install

Итак, вы не хотите, чтобы ваш пользователь вводил пароль для использования sudo? Вы можете добавить строку, подобную этой, в /etc/sudoers или файл в /etc/sudoers.d/

username  ALL=(ALL) NOPASSWD: ALL
Или просто разрешить несколько таких программ, как reboot и apt-get:
username ALL=(ALL) NOPASSWD: /sbin/reboot, /usr/bin/apt-get
Возможно, вы захотите изучить некоторые опции apt-get тоже:
   -q, --quiet
       Quiet; produces output suitable for logging, omitting progress
       indicators. More q's will produce more quiet up to a maximum of 2.
       You can also use -q=# to set the quiet level, overriding the
       configuration file. Note that quiet level 2 implies -y; you should
       never use -qq without a no-action modifier such as -d, --print-uris
       or -s as APT may decide to do something you did not expect.
       Configuration Item: quiet.

   -y, --yes, --assume-yes
       Automatic yes to prompts; assume "yes" as answer to all prompts and
       run non-interactively. If an undesirable situation, such as
       changing a held package, trying to install a unauthenticated
       package or removing an essential package occurs then apt-get will
       abort. Configuration Item: APT::Get::Assume-Yes.

   --force-yes
       Force yes; this is a dangerous option that will cause apt to
       continue without prompting if it is doing something potentially
       harmful. It should not be used except in very special situations.
       Using force-yes can potentially destroy your system! Configuration
       Item: APT::Get::force-yes.

Или вы можете слепо проложить несколько строк новой строки или «q» в apt-get, я использовал один пакет, который игнорировал бы опции apt, такие как -y и дождитесь нажатия клавиши (возможно, в сценарии preinst или postinst). Можно попробовать что-то вроде:

username  ALL=(ALL) NOPASSWD: ALL
Или просто разрешить несколько таких программ, как reboot и apt-get:
username ALL=(ALL) NOPASSWD: /sbin/reboot, /usr/bin/apt-get

И если вы устанавливаете одни и те же пакеты на каждом компьютере, вам не нужно update и upgrade каждый в Интернете, вы можете загрузить все необходимые файлы .deb один раз с помощью:

[!d2 ]

sudo apt-get install --download-only [packages]
или
sudo apt-get upgrade --download-only

Или просто разрешить несколько таких программ, как reboot и apt-get:

, затем установить их все из локальной / общей папки с помощью
   -q, --quiet
       Quiet; produces output suitable for logging, omitting progress
       indicators. More q's will produce more quiet up to a maximum of 2.
       You can also use -q=# to set the quiet level, overriding the
       configuration file. Note that quiet level 2 implies -y; you should
       never use -qq without a no-action modifier such as -d, --print-uris
       or -s as APT may decide to do something you did not expect.
       Configuration Item: quiet.

   -y, --yes, --assume-yes
       Automatic yes to prompts; assume "yes" as answer to all prompts and
       run non-interactively. If an undesirable situation, such as
       changing a held package, trying to install a unauthenticated
       package or removing an essential package occurs then apt-get will
       abort. Configuration Item: APT::Get::Assume-Yes.

   --force-yes
       Force yes; this is a dangerous option that will cause apt to
       continue without prompting if it is doing something potentially
       harmful. It should not be used except in very special situations.
       Using force-yes can potentially destroy your system! Configuration
       Item: APT::Get::force-yes.

1
задан 6 October 2017 в 00:11

0 ответов

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

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