我在 OpenSuse 上以 root 身份运行以下命令:
linux-gn77-PC:/home/harbir/project # crontab -e
Run Code Online (Sandbox Code Playgroud)
当编辑器打开时,我输入以下内容,因为我希望命令在 2145 小时运行
45 21 * * * * /home/harbir/project/maildispatcher.sh &> /tmp/mycommand.log
Run Code Online (Sandbox Code Playgroud)
当我尝试保存文件时,我收到以下消息
crontab: installing new crontab
"/tmp/crontab.WOxjzG":1: bad command
errors in crontab file, can't install.
Do you want to retry the same edit?
Run Code Online (Sandbox Code Playgroud)
我希望 crontab 的输出转到文件/tmp/mycommand.log。
我在 Oracle Virtual Box 上安装了 openSuse 作为虚拟机,并且我已经按照我需要的方式配置了一些软件。我需要在新服务器(不是虚拟机)上复制类似的环境。我在想是否可以从虚拟机创建一个 iso 映像,它可以用作我的服务器的可启动映像?如果有,那怎么才能实现呢?谢谢
我正在使用 openSuse 12.3。
我使用以下方法创建了一个新用户:
linux-amvn:~ # useradd -m -G users,dev -s /bin/bash -p pass123 harbir-PC
Run Code Online (Sandbox Code Playgroud)
用户harbir-PC无法登录,当我尝试使用记录ssh。我继续查看/etc/passwd文件,我看到以下内容:
harbir:x:1000:100:harbir:/home/harbir:/bin/bash
kdm:x:489:487:KDM Display Manager daemon:/var/lib/kdm:/bin/false
harbir-PC:x:1001:100::/home/harbir-PC:/bin/bash
Run Code Online (Sandbox Code Playgroud)
用户harbir和之间存在差异harbir-PC。
我对用户harbir(我在安装过程中创建的)没有问题,但我需要使用该用户登录harbir-PC。
我还检查了/etc/shadow,并且密码已加密。