有没有办法通过脚本向用户的 cron 添加行?
我通常使用crontab -e
,但我想使用 shell 脚本自动执行此任务。
我想知道一些特定的包安装了什么,例如,在安装时ncurses
,我发现TAB密钥扩展:
sudo apt-get install ncurses-
Run Code Online (Sandbox Code Playgroud)
显示:
ncurses-base ncurses-doc ncurses-hexedit
ncurses-bin ncurses-examples ncurses-term
Run Code Online (Sandbox Code Playgroud)
我怎么知道ncurses-term
安装了什么?我主要对程序感兴趣,但库和任何其他文件类型也可能有用。
如果可能,命令行方法将是首选(也接受任何其他方法)。
我在 Ubuntu、Xubuntu、Kubuntu、Lubuntu、桌面、服务器、Live 等上创建了新用户并多次更改了他/她的密码。
但是,几周前(我认为这是由于上次系统更新),我在Ubuntu Server v14.04.1 LTS 上的密码管理遇到了问题(抱歉,我的 Ubuntu 是西班牙语,但我认为这很容易了解问题):
luis@Balanceador:~$ sudo adduser prueba
[sudo] password for luis:
Anadiendo el usuario `prueba' ...
Anadiendo el nuevo grupo `prueba' (1002) ...
Anadiendo el nuevo usuario `prueba' (1002) con grupo `prueba' ...
Creando el directorio personal `/home/prueba' ...
Copiando los ficheros desde `/etc/skel' ...
Nueva contrasena:
/var/cache/cracklib/cracklib_dict.pwd: No existe el archivo o el directorio
BAD PASSWORD: The password fails the dictionary check …
Run Code Online (Sandbox Code Playgroud) 正如 AskUbuntu(多线程)上的详细说明,我正在尝试更改当天的消息。
这是我的编辑:
luis@Terminus:/etc$ cat /etc/motd.tail
____ _ _ ____
/ ___| ___ _ __ __ _| | __ _ (_) ___ / ___| ___ _ ____ ____ _
\___ \ / _ \| '_ \ / _` | |/ _` || |/ _ \ \___ \ / _ \ '__\ \ / / _` |
___) | (_) | |_) | (_| | | (_| || | (_) | ___) | __/ | \ V / (_| …
Run Code Online (Sandbox Code Playgroud) 14.04 ×1
apt ×1
automation ×1
command-line ×1
cron ×1
dictionary ×1
motd ×1
password ×1
scripts ×1