AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-266012

John Scott's questions

Martin Hope
John Scott
Asked: 2015-12-18 17:58:12 +0800 CST

Shell 脚本无法正常运行

  • 0

我需要帮助运行 shell 脚本。在我的高中,我参加了一场网络安全竞赛,我们得到了操作系统的虚拟机,我们必须纠正这些安全漏洞。Ubuntu 是我们获得的操作系统之一。为了帮助自己参加比赛,我编写了一个 shell 脚本来自动执行一些任务。这是一个普通的 shell 脚本,旨在与 Bash 一起运行(我#!/bin/bash在脚本中使用而不是典型的,#!/bin/sh因为它使用了一些特定于 Bash 的功能)但它在虚拟机中总是表现得很奇怪。我总是使文件可执行chmod +x,但这没有任何帮助。这是发生了什么。每当我尝试调用脚本时,它就像在终端上打印脚本的随机位并执行脚本的其他部分。这很奇怪,我不知道如何解决它。我该怎么办?

以下是脚本:

#!/bin/bash

# Security vulnerability scanner for Ubuntu
# Written by John L. Scott

# TODO
# Add PAM restrictions
# Change all users’ passwords

export UNIXMESSAGE1="The following UNIX program could not be found:"
export UNIXMESSAGE2="Please confirm that your standard Unix utilities are installed."

clear

echo "Starting Ubuntu security script..."
echo ""

# Check if script is running as root
if [ "$UID" != 0 ]
then
    echo "This script must be run as root."
    exit 1
fi

# Start dependency check

if [ "$(which nc)" = "" ]
then
    echo "Netcat is not installed. Install Netcat and try again."
    exit 1
fi

# Temporarily decrease swappiness for this session to make the system faster
if [ "$(which sysctl)" != "" ]
then
    sysctl vm.swappiness=0 > /dev/null
fi

if [ "$(which passwd)" = "" ]
then
    echo "$UNIXMESSAGE1 passwd"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which env)" = "" ]
then
    echo "$UNIXMESSAGE1 env"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which chown)" = "" ]
then
    echo "$UNIXMESSAGE1 chown"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which chmod)" = "" ]
then
    echo "$UNIXMESSAGE1 chmod"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which mkdir)" = "" ]
then
    echo "$UNIXMESSAGE1 mkdir"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which rm)" = "" ]
then
    echo "$UNIXMESSSAGE1 rm"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which touch)" = "" ]
then
    echo "$UNIXMESSAGE1 touch"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which pwd)" = "" ]
then
    echo "$UNIXMESSAGE1 pwd"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which sleep)" = "" ]
then
    echo "$UNIXMESSAGE1 sleep"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which cat)" = "" ]
then
    echo "$UNIXMESSAGE1 cat"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which ls)" = "" ]
then
    echo "$UNIXMESSAGE1 ls"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which mv)" = "" ]
then
    echo "$UNIXMESSAGE1 mv"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which cp)" = "" ]
then
    echo "$UNIXMESSAGE1 mv"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which grep)" = "" ]
then
    echo "$UNIXMESSAGE1 grep"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which deluser)" = "" ]
then
    echo "$UNIXMESSAGE1 deluser"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which sha512sum)" = "" ]
then
    echo "$UNIXMESSAGE1 sha512sum"
    echo "$UNIXMESSAGE2"
    exit 1
fi

if [ "$(which nano)" = "" ]
then
    echo "nano is not installed. Please install nano and try again."
    exit 1
fi

if [ "$(which awk)" = "" ]
then
    echo "No AWK interpreter was found."
    echo "Please install an AWK interpreter and try again."
    exit 1
fi

if [ "$(which uname)" = "" ]
then
    echo "$UNIXMESSAGE1 uname"
    echo "$UNIXMESSAGE2"
    exit 1
fi

# Now that we know uname is installed, we can run a quick kernel/OS check

if [ "$(uname -s)" != "Linux" ]
then
    if [ "$(uname -s)" = "Darwin" ]
    then
        echo "This script is running on an OS with the Darwin kernel, most likely OS X."
        echo "This script should be run on Ubuntu with the Linux kernel instead."
        echo ""
    else
        echo "The kernel currently running is not Linux."
        echo "This script should be run on Ubuntu with the Linux kernel instead."
    fi
    exit 1
fi

if [ "$(which apt-get)" = "" ]
then
    echo "APT is not installed."
    echo "Are you sure you're running this on Ubuntu?"
    echo "Make sure that APT is installed and try again."
    exit 1
fi

if [ "$(which python2)" = "" ]
then
    echo "Python 2 is not installed."
    echo "Please install Python 2 and try again."
    exit 1
fi

# If lsb_release is available, check one last time to make sure this only runs on Ubuntu
# If lsb_release is not available, don't worry about it and move on
if [ "$(which lsb_release)" != "" ]
then
    if [ "$(lsb_release -s -i)" != "Ubuntu" ]
    then
        echo "This script is meant to be run on Ubuntu. Try running this script again on Ubuntu."
        exit 1
    fi
    if [ "$(lsb_release -s -r)" != "12.04" ]
    then
        if [ "$(lsb_release -s -r)" != "14.04" ]
        then
            echo "This script has not yet been tested on Ubuntu $(lsb_release -s -r), but it will probably still work."
        fi
    fi
fi

# Let's test if the Internet connection works using Netcat
nc -z 8.8.8.8 53
if [ "$?" != "0" ]
then
    echo "You do not seem to have a working Internet connection."
    echo "Connect to the Internet and try again."
fi

# Warn about any installed server software that we should be concerned about

if [ -d /etc/apache2 ]
then
    echo "The Apache configuration file directory (/etc/apache2) has been found."
    echo "Apache may be installed."
    echo ""
fi

if [ -d /etc/mysql ]
then
    echo "The MySQL configuration file directory (/etc/mysql) has been found."
    echo "MySQL or MariaDB may be installed."
    echo ""
fi

if [ -d /etc/nginx ]
then
    echo "The Nginx configuration file directory (/etc/nginx) has been found."
    echo "Nginx may be installed."
    echo ""
fi

if [ -e /etc/ssh/sshd_config ]
then
    echo "The OpenSSH server configuration file has been found."
    echo “The OpenSSH server may be installed."
    echo "Remember to disable root login with \`PermitRootLogin no\`."
    echo ""
fi

echo "All systems tests have been run successfully. Press any key to start."
read -n 1 -s

# Install updates with APT

echo "Updating APT package cache..."
apt-get -qq update # -qq makes APT as silent as possible while still printing errors
echo "Checking for package upgrades..."
apt-get -qq dist-upgrade && echo "Done."
echo ""

# Warn about any suspicious software

if [ "$(which nmap)" != "" ]
then
    echo "Nmap is installed!"
    echo "Nmap is a program that can be used to scan devices on a network, search for open ports, and do other networking tasks."
    echo "Nmap can be used to perform malicious tasks."
    echo "This will be removed, assuming it has been installed with the package management system."
    apt-get purge nmap
fi

if [ "$(which wireshark)" != "" ]
then
    echo "Wireshark is installed!"
    echo "Wireshark is a packet analyzer that can inspect network traffic."
    echo "Wireshark can be used to perform malicious tasks."
    echo "This will be removed, assuming it has been installed with the package management system."
    apt-get purge wireshark
fi

if [ "$(which john)" != "" ]
then
    echo "John the Ripper is installed!"
    echo "John the Ripper is a password cracking tool that can be used to perform many different kinds of attacks to access users’ passwords."
    echo "John the Ripper can be used to perform malicious tasks."
    echo "This will be removed, assuming it has been installed with the package management system."
    apt-get purge john
fi

if [ "$(which tor)" != "" ]
then
    echo "Tor is installed!"
    echo "Tor is network anonymity software that can be used to get around network restrictions and secretly do activities over the Internet."
    echo "Tor is often associated with the Deep Web and the Dark Web."
    echo "This will be removed, assuming it has been installed with the package management system."
    apt-get purge tor
fi

echo "Here is a list of all users in the \"sudo\" group:"
python2 -c "import grp; print grp.getgrnam('sudo')[3]"
echo ""
echo "If you see anyone in that list that should not have administrator permissions, enter their username now or type \"done\"."

while true
do
    read DELSUDO
    if [ "$DELSUDO" = "done" ]
    then
        break
    fi
    deluser $DELSUDO sudo
    echo "If you must restrict another user from having administrator permisssions, enter their username now or type \"done\"."
done
echo ""

# Apache hardening
if [ -e /etc/apache2/apache2.conf ]
then
    echo "Here is a list of all users in the \"www-data\" group:"
    python2 -c "import grp; print grp.getgrnam('www-data')[3]"
    echo ""
    echo "If you see anyone in that list that should not have access to the Apache web server, enter their username now or type \"done\"."

    while true
    do
        read DELAPACHE
        if [ "$DELAPACHE" = "done" ]
        then
            break
        fi
        deluser $DELAPACHE www-data
        echo "If you must restrict another user from having access to Apache, enter their username now or type \"done\"."
    done
    echo ""
fi

# Let’s delete the root password if there is one
# Ubuntu uses sudo for all administrative tasks, so having a root account is a bad thing
passwd -l root

echo "Here is a list of (almost) all users on the system (check in the GUI later to be sure):"
awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) print $1}' /etc/passwd
echo ""
echo "If you see any users in that list that should not be on this system, enter their username now or type \"done\"."

while true
do
    read DELUSER
    if [ "$DELUSER" = "done" ]
    then
        break
    fi
    deluser --remove-home $DELUSER
    echo "If you must delete another user, enter their username now or type \"done\"."
done

echo ""

# Set the proper permissions for various files
chown root:root /etc/shadow
chmod 000 /etc/shadow
chown root:root /etc/passwd
chmod 644 /etc/passwd
chown root:root /etc/group
chmod 644 /etc/group
chown root:root /etc/fstab
sudo chmod 664 /etc/fstab

echo "Looking around for media files..."
echo "If any are found, take note and inspect these manually."
find /home -regex ".*\.\(wav\|aif\|mp4\|ogg\|avi\|mp3\|flac\|m4a|oga\|wma\|opus\|wma\|webm\|flv\|gif\|png\|jpg\|mov\|wmv\|mpg\|mpeg\|flv\)"

echo "Installing Gufw..."
echo "Use this to set up a firewall."
sudo apt-get -qq install gufw

echo "The security scan is complete."
exit 0
command-line
  • 1 个回答
  • 1525 Views
Martin Hope
John Scott
Asked: 2015-09-20 15:45:26 +0800 CST

如何复制构建动态链接程序的库?

  • 0

最近,我一直在编译和分发软件。上次我这样做是通过构建我的程序并在其上运行 ldd 来获取它所链接的所有库。我得到了库的路径(比如 say /lib/x86_64-linux-gnu/libc.so.6),然后从我的系统中复制并粘贴了它。它工作得很好,但手动复制和粘贴每个库似乎是重复的。有没有一种方法可以让我单独获得库的路径列表(没有所有的libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1dc3333000)),这样我就可以复制它们并在我的构建中分发它们?

compiling
  • 2 个回答
  • 1827 Views
Martin Hope
John Scott
Asked: 2015-04-29 14:23:04 +0800 CST

Python 应用程序因模块错误而崩溃

  • 3

我刚刚更新了系统上的一些软件,现在每次尝试启动使用 Python 的程序时都会出现奇怪的错误,即使我系统上的所有依赖项都已正确解决。出口输出

Traceback (most recent call last):
  File "/usr/lib/exaile/exaile.py", line 85, in <module>
    main()
  File "/usr/lib/exaile/exaile.py", line 80, in main
    from xl import main
  File "/usr/lib/exaile/xl/main.py", line 42, in <module>
    from xl.nls import gettext as _
  File "/usr/lib/exaile/xl/nls.py", line 33, in <module>
    import locale
ImportError: No module named locale

和运行sudo add-apt-repository输出

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 11, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 34, in <module>
    import threading
ImportError: No module named 'threading'

我不知道为什么会发生这种情况,因为我已经在我的系统上解决了所有依赖关系,这意味着我不应该遗漏任何东西。出了什么问题,我该如何解决?

python
  • 1 个回答
  • 2791 Views
Martin Hope
John Scott
Asked: 2015-04-21 13:35:52 +0800 CST

帮助进行 ARM 交叉编译

  • 5

我最近一直在尝试为 ARM 交叉编译程序。但是,当我运行时make,我总是会在一分钟或更短的时间内收到类似这样的错误

/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgio-2.0.

令我困惑的是,每次我尝试交叉编译一个程序时都会遇到这个错误(除了它并不总是说它找不到 -lgio-2.0。它也很难找到其他东西)。我做错了什么吗?为什么总是这个错误?我能够成功交叉编译的唯一程序是 bash,但我在其他所有方面都遇到了问题。我该怎么办?我已经安装了所有的库和东西,因为我能够很好地本地编译程序。

gcc
  • 2 个回答
  • 14831 Views
Martin Hope
John Scott
Asked: 2015-03-29 13:07:08 +0800 CST

Unity 启动器中存在无法解释的巨大差距

  • 1

从屏幕截图中可以看出,我的 Unity 启动器无缘无故出现了很大的差距。我正在从我的 Unity 启动器中锁定和解锁一些东西,它就发生了。我不知道为什么。这是一个错误吗?我该如何解决?

Unity 启动器的屏幕截图

14.04
  • 1 个回答
  • 226 Views
Martin Hope
John Scott
Asked: 2015-03-14 12:49:08 +0800 CST

Minecraft 和 Intel 显卡随机屏幕闪烁

  • 6

我正在使用带有 Intel HD Graphics 2500 (Ivy bridge) 的系统,但在玩 Minecraft 时遇到一点问题。有时,我的屏幕会闪烁蓝色,但偶尔只有一秒钟。每隔 10 秒左右,我就会看到闪光灯。它只发生在我搬家时或搬家后不久。如果我保持绝对静止,它永远不会发生。它发生在 OpenJDK 7 和 Oracle Java 8 上。我检查了 X11 日志,没有发现任何奇怪的东西。我已经尝试了每个 Minecraft 设置,但还没有找到任何有效的设置。另外,我注意到如果我把窗口变小就不会发生闪烁。到底是怎么回事?

minecraft
  • 3 个回答
  • 16348 Views
Martin Hope
John Scott
Asked: 2015-02-28 21:06:27 +0800 CST

建立 MySQL 数据库连接时运行命令

  • 0

我已经成功地设置了一个 AMP 服务器(Apache、MySQL 和 PHP)并安装了我的内容管理系统 (Joomla!),我正在使用它来制作一个小型网站。只要有人连接到站点以获取页面,CMS 就会连接到 MySQL。但是,我想在建立数据库连接时运行一个命令(是的,一个普通的 GNU/Linux 命令,而不是一个 MySQL 命令)。我不在乎这是否意味着修改 MySQL 服务器设置或在永远循环中运行脚本来检查数据库连接(我愿意这样做)。我该怎么做呢?谢谢。(PS系统运行的是MySQL 5.5。)

server
  • 1 个回答
  • 133 Views
Martin Hope
John Scott
Asked: 2015-01-19 19:01:26 +0800 CST

GRUB 未检测到 Windows 第二个硬盘驱动器

  • 0

我帮助我的一个朋友双启动 Xubuntu 14.04 和 Windows 7 Professional。我把 WIndows 7 放在 80GB 的硬盘上,把 Xubuntu 放在 1TB 的硬盘上。我启动进入 Xubuntu 并运行update-grub,但它没有检测到 Windows。我尝试在安装和卸载驱动器的情况下进行操作。此外,系统使用 BIOS,而不是 UEFI。这是一个全新的 Windows 7 安装,因此它没有碎片化或损坏,我完全关闭了系统。现在我该怎么做?

boot
  • 1 个回答
  • 7371 Views
Martin Hope
John Scott
Asked: 2014-11-09 10:18:18 +0800 CST

除非root,否则无法写入闪存驱动器

  • 2

我用 GParted 格式化了我的闪存驱动器,并给它一个 32GB FAT32 文件系统。现在,我只能以 root 身份写入它!我试过运行命令sudo chown $USER:$USER -R /media/usb0/,但出现不允许操作的错误,这很奇怪,因为我以 root 身份运行该命令。ls -la /media/usb0/给

total 20
drwxr-xr-x 2 root root 16384 Dec 31  1969 .
drwxr-xr-x 6 root root  4096 Nov  8 08:22 ..

sudo fdisk -l /dev/sdb1 给出磁盘 /dev/sdb1:29.8 GiB,32004636672 字节,62509056 个扇区单位:扇区 1 * 512 = 512 字节扇区大小(逻辑/物理):512 字节/512 字节 I/O 大小(最小/最佳):512 字节/512 字节磁盘标签类型:dos 磁盘标识符:0x0009e87d

Device Boot Start End Sectors Size Id Type /dev/sdb1p1 ? 3223366752 3470046675 246679924 117.6G f4 SpeedStor /dev/sdb1p2 ? 378192737 710426324 332233588 158.4G 10 OPUS /dev/sdb1p3 ? 225603442 225603451 10 5K 74 未知

分区表条目不按磁盘顺序排列。

cat /etc/fstab 给出 /etc/fstab: 静态文件系统信息。使用 'blkid' 打印通用唯一标识符

设备; 这可以与 UUID= 一起使用,作为一种更可靠的设备命名方式

即使添加和删除磁盘也能正常工作。请参阅 fstab(5)。

#

/ 在安装期间位于 /dev/sda1

UUID=f4b26011-2e69-4f2f-94c5-151e750d615d / ext4 错误=remount-ro 0 1

安装期间交换在 /dev/sda5 上

UUID=4dfce2fd-fad5-4aaa-bebe-bc8500b6f3e6 none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/sr1 /media/cdrom1 udf,iso9660 user,noauto 0 0 /dev /sdb1 /media/usb0 auto rw,user,noauto 0 0

partitioning
  • 2 个回答
  • 1917 Views
Martin Hope
John Scott
Asked: 2014-10-15 17:08:29 +0800 CST

禁用 Ctrl + 空格键 MATE

  • 0

我的 Ubuntu 计算机上有 MATE,但我有一个小而简单的问题。我全屏玩游戏,当我按Ctrl+键时Spacebar,它会取消捕获鼠标。如何禁用Ctrl+的这个功能Spacebar?

14.04
  • 2 个回答
  • 1942 Views
Martin Hope
John Scott
Asked: 2014-10-15 15:52:39 +0800 CST

nm-applet 未在启动时运行 [重复]

  • 2
这个问题在这里已经有了答案:
网络管理器图标消失 14.04 (5 个答案)
7 年前关闭。

我已经在 Ubuntu 14.04 上安装了 MATE,尽管 nm-applet 被设置为启动应用程序并正在安装,但它并没有在启动时运行。当我登录时,我可以打开一个终端,输入 nm-applet,然后它就可以工作,但当我重新启动计算机时就不行了。

14.04
  • 1 个回答
  • 2276 Views
Martin Hope
John Scott
Asked: 2014-10-15 12:16:21 +0800 CST

Fn 键无法调节亮度 MATE 桌面

  • 1

我刚刚安装了 Ubuntu 14.04 并删除了 Unity 并安装了 MATE。现在,我键盘上的 Fn 键无法调节亮度。这是让它变得更加混乱的事情:我的亮度在 Unity 下工作。更令人困惑的是,MATE 中有一个错误会导致出现一个白色的小方块。我没看到。这就像当我按下我的亮度键时,没有任何反应,就像我什至没有按下它们一样。这在 Unity 下工作。

14.04
  • 1 个回答
  • 6823 Views
Martin Hope
John Scott
Asked: 2014-10-03 15:36:55 +0800 CST

如何获取和安装shc?

  • 1

shc 是一个将 bash 脚本编译成 Linux 可执行文件的编译器。但是,我找不到官方网站,也无法在 Ubuntu 存储库中找到它。什么是官方网站,为什么它不在回购协议中?在 Ubuntu 14.04 中安装 shc 的推荐方法是什么?

software-installation
  • 3 个回答
  • 6922 Views
Martin Hope
John Scott
Asked: 2014-09-20 18:24:39 +0800 CST

让窗口图标与 Zenity 一起工作

  • 2

我在使用 Zenity 时遇到了一个奇怪的问题。我以前从未使用过 Zenity,所以这可能是个错误。如果我键入zenity --question --text=QUESTIONGOESHERE --window-icon=/some/path/to/64x64/.png/file应该使图标 (.png) 将作为 Zenity 图标出现在启动器上的命令,不是吗?它不工作。它需要有不同的尺寸吗?不能是 .png 之类的吗?我需要帮助。只是图标不显示。

14.04
  • 2 个回答
  • 5413 Views
Martin Hope
John Scott
Asked: 2014-09-03 03:08:42 +0800 CST

Gateway NE56R 64-Bit 无声音

  • 0

我有一个 Gateway NE56R,有时当我启动计算机时,声音就不起作用了。此外,当我第一次打开我的计算机并且 Ubuntu 开始启动时,我收到消息说一些东西。我想我只需要重新安装我的驱动程序。如何为我的声音安装驱动程序以及如何确保驱动程序已启用?我不想安装声音驱动程序只是为了注意到我的声音在我的计算机上使用不同的驱动程序。我注意到在我登录之前声音确实工作得很好。另外,在我的电脑启动时,在黑色的启动屏幕上,我得到了一些错误:

drm module has bad taint, not creating trace events
i915 module has bad taint, not creating trace events
snd_hda_controller module has bad taint, not creating trace events
snd_hda_codec module has bad taint, not creating trace events
14.04
  • 1 个回答
  • 241 Views
Martin Hope
John Scott
Asked: 2014-08-23 17:40:18 +0800 CST

使密码在 bash 脚本中被审查 [重复]

  • 1
这个问题在这里已经有了答案:
如何使读取命令静音 (1 个回答)
2 年前关闭。

我将使这个简短而简单。我正在制作一个 bash 脚本,用户需要使用 read 命令输入他们的 root 密码,它将存储在一个变量中。我不喜欢的是他们输入的密码清晰可见。我希望他们的密码显示为星号或像通常输入 root 密码时一样不可见。我不介意使用 tput。我怎样才能做到这一点?

command-line
  • 1 个回答
  • 809 Views
Martin Hope
John Scott
Asked: 2014-07-24 07:31:14 +0800 CST

Swappiness 变化导致问题

  • 0

几天前,我将内核的 swappiness 从 60 更改为 30。

我有问题。在启动时,我看到错误(仅在 Windows 中;据我所知,Unity 和 X.org 仍然可以正常工作)表明程序已崩溃并报告它,并且“检测到系统问题”或类似的东西,或者“Ubuntu 14.04 遇到内部错误”。

我该如何解决这个问题而不必将我的 swappiness 提高到 60,或者我不能以其他方式解决它?这些问题是 bug 还是当你改变 swappiness 时会发生什么?

14.04
  • 1 个回答
  • 1388 Views
Martin Hope
John Scott
Asked: 2014-07-21 11:39:11 +0800 CST

如何让 Apache 2 停止询问 SSL 证书的密码?

  • 4

我刚刚向 Apache 添加了一个 SSL 证书。问题是 Apache 在系统启动时运行,在我的服务器打开后,Apache 运行但不运行。我输入了我电脑的 IP 地址,我的浏览器一直在尝试连接。我看到一个旋转的圆圈。

然后我进入我的服务器,终止所有与 Apache 相关的进程,然后运行sudo service apache2 restart​​. 因为系统sudo提示我输入我的超级用户密码,但在我输入后,Apache 要求输入 .key 文件的密码。我把它放进去,然后 Apache 工作正常。SSL 甚至可以工作。

那么,为什么 Apache 在我重新启动之前无法工作?是因为它要我每次启动都输入密码吗?如果是这样,我该如何在我的 Xubuntu 服务器上执行此操作?我可以做到这样我就不必每次都把它放进去吗?

apache2
  • 2 个回答
  • 38861 Views
Martin Hope
John Scott
Asked: 2014-07-16 12:57:24 +0800 CST

更新使系统行为异常

  • 0

我刚刚为支持 Unity 3D 的 Ubuntu 14.04 笔记本电脑下载了一些更新。我注意到其中一个更新是针对 Compiz 的。我更新了它,重新启动了我的系统,现在一切都不同了。一切的字体都不同(即使在 Firefox 中),而且~/Desktop我的桌面上没有显示任何内容。此外,在我的桌面上按鼠标右键不显示菜单。

这是怎么回事?这应该发生吗?每个下载此更新的人都遇到同样的问题吗?我如何解决它?以下是 ~/.xsession-errors 的内容:

Script for ibus started at run_im. Script for auto started at run_im. Script for default started at run_im. init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd respawning too fast, stopped

下面是字体现在的样子(我讨厌它的样子!)

带有我不喜欢的字体的图像

另外,我查看了我的主目录中的文件,发现了一个我认为是由 OpenJDK 制作的日志。这可能与它有关,因为我只是在系统开始“表现奇怪”后才注意到它。不过日志太大,这里贴不出来。然而,我确实把它放在了我的个人 Dropbox 上并进行了分享。你可以在这里看到它。请帮忙。我的笔记本电脑上只安装了 Ubuntu 三天(但我不是菜鸟;我有很多经验)而且我不想重新安装。

unity
  • 1 个回答
  • 125 Views
Martin Hope
John Scott
Asked: 2014-07-15 09:53:08 +0800 CST

启动时的错误消息[重复]

  • 1
这个问题在这里已经有了答案:
Ubuntu 13.04 lenovo m490 INFO @wl_cfg80211_attach:已注册 CFG80211 phy [关闭] (1 个回答)
8 年前关闭。

我昨天刚在我的网关 NE56R41u 上安装了 Ubuntu。事实上,它与 Windows 8.1 UEFI 双启动,但这与我的问题无关。但是,当我打开计算机时,我收到一条显示大约一秒钟的错误消息。不过,我不知道这是什么意思,它显示的时间不到一秒钟。告诉我,这意味着什么重要的事情吗?我如何解决它?另外,无论它是否重要或是否可以修复,如何防止在我打开计算机时显示该消息?错误如下:

[10.987] info @wl_cfg80211_attach CFG80211 Phy
boot
  • 1 个回答
  • 342 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve