小编cof*_*der的帖子

如何将用户添加到“sudo”组?

/etc/sudoers我看到这个:

# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
Run Code Online (Sandbox Code Playgroud)

那么如何将用户添加到该sudo组?

sudo user-management groups

217
推荐指数
4
解决办法
62万
查看次数

您如何将所有用户的默认 shell 更改为 bash?

我希望从现在开始的每个新用户都默认使用 bash 作为他们的 shell。

我知道要将您自己的 shell 更改为 bash,您将使用命令“chsh -s /bin/bash”,但是默认情况下如何自动将所有未来用户的 shell 设置为 bash?

command-line bash adduser

46
推荐指数
2
解决办法
14万
查看次数

如何设置默认使用哪个 PostgreSQL 版本?

我的系统上安装了 2 个不同版本的 PostgreSQL (Ubuntu Lucid):

  • /var/lib/postgresql/8.4
  • /var/lib/postgresql/9.0

默认情况下,当我运行 createb 或 psql 等 PostgreSQL 命令时,使用 9.0 版本。

如何将我的系统配置为默认使用 8.4 版本?

configuration init.d default postgresql

27
推荐指数
2
解决办法
3万
查看次数

如何从 Mac -> Ubuntu VirtualBox SCP 文件?

我有一台 Mac (OS X) 和一个运行 Ubuntu 的 VirtualBox。

我想将一个 500mb 的文件从 Mac SCP 到 VirtualBox。我该怎么做呢?(可能与 /etc/hosts 有关?)

mac virtualbox hosts file-sharing scp

17
推荐指数
4
解决办法
5万
查看次数

如何从 Ubuntu 的命令行播放 MIDI?

我想做类似的事情

$ play filename.mid
Run Code Online (Sandbox Code Playgroud)

并在不打开图形程序的情况下听到播放的 MIDI 文件。是否有可以执行此操作的 Ubuntu 软件包?

sound command-line music midi

16
推荐指数
3
解决办法
2万
查看次数

我应该为 Nagios 安装哪个 mailx 包?

我正在遵循Nagios Ubuntu 快速入门说明。我在 Ubuntu 10.10 上安装 Nagios 3.2.3。

在文档的底部,它说我需要安装 mailx 和 postfix 包。(Postfix 已经安装。)但是当我尝试安装 mailx 时,我被问到要安装 3 个软件包中的哪一个:

$ sudo apt-get install mailx
[sudo] password for nagios: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mailx is a virtual package provided by:
  mailutils 1:2.1+dfsg1-4ubuntu1
  heirloom-mailx 12.4-1.1
  bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1
You should explicitly select one to install.
E: Package mailx has no installation candidate
Run Code Online (Sandbox Code Playgroud)

我应该安装哪一个?

email mail postfix nagios3

11
推荐指数
1
解决办法
1万
查看次数

当我创建一个新用户时,如何在他们的主目录中自动创建一个 .virtualenvs 目录?

我想在创建新用户时在每个新用户的主目录中自动创建一个名为“.virtualenvs”的目录。

我正在使用 useradd 命令来创建新用户。

users adduser

8
推荐指数
1
解决办法
4808
查看次数

为 Nagios 安装 GD 图形库的最佳方法是什么?

在尝试安装 Nagios 3.2.3 时,我运行了他们的 ./configure 脚本并收到以下错误:

checking for main in -liconv... no
checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... no
checking for gdImagePng in -lgd (order 3)... no
checking for gdImagePng in -lgd (order 4)... no


*** GD, PNG, and/or JPEG libraries could not be located... *********

Boutell's GD library is required to compile the statusmap, trends
and histogram CGIs.  Get it from http://www.boutell.com/gd/, compile
it, and use the --with-gd-lib and --with-gd-inc …
Run Code Online (Sandbox Code Playgroud)

graphics nagios3 png

3
推荐指数
1
解决办法
3万
查看次数