小编San*_*ich的帖子

Useradd使用crypt密码生成

我正在研究我认为是一个非常简单的脚本,使用'useradd'动态创建一个FTP用户.我不熟悉这个过程的几个部分,整整一天的研究都没有让我太过分.这是我有的:

password="pass"
pass=$(perl -e 'print crypt($ARGV[0], "wtf")' $password)
useradd -d HOME_DIR -s /bin/bash -g GROUP -p $pass -f -1 testing
Run Code Online (Sandbox Code Playgroud)

笔记

  1. HOME_DIR和GROUP是占位符
  2. 我对'useradd'的home/base_dir(-d,-b)或group(-g)功能没有问题

话题:

  1. 为什么我的密码生成工作不起作用?
  2. 是/ bin/bash用于纯FTP用户的正确shell,还是我会使用/ bin/false或不同的shell?
  3. 默认情况下,useradd禁用帐户,直到他们提供自己的密码,我该如何绕过这个?
  4. 我不想使用passwd实用程序,因为它削弱了我自动生成FTP帐户的能力,我在这里找到了解决方案,但我不明白解决方案

让我知道,如果我说这一切都错了,或者我想要做的事情是不可能的,或者我是否对我在此陈述的任何事情都有所误导.感谢您提供任何帮助.:d

ftp shell passwd

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

SVG,动画从x1,y1到x2,y2的一条线?

animate属性的记录非常松散.不幸的是,对于我来说,W3文档SVG的方式非常难以理解和交叉引用.

我要工作(至少向前迈出一步)......应该知道将秒转换为毫秒(拍打,前额)

我更新了代码以反映我的下一个踩踏石(遇到另一个问题).当我有两行动画时,另一行在下一行启动时会消失,我该怎么做才能使每一行都保持动画状态?...我认为它与'fill'属性有关,但'fill = freeze'将线转换为垂直.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
         "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="1020" height="768" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:rgb(255,255,255)" >
<g style="stroke:black" >
<line x1="242.25" y1="216" x2="242.25" y2="216" style="stroke:rgb(0,0,0);stroke-width:1;" >
<animate attributeName="x2" attributeType="XML" from="242.25" to="219.9375" begin="0ms" dur="117ms" />
<animate attributeName="y2" attributeType="XML" from="216" to="170.999808" begin="0ms" dur="117ms" />
</line>
<line x1="219.9375" y1="170.999808" x2="219.9375" y2="170.999808" style="stroke:rgb(0,0,0);stroke-width:1;" >
<animate attributeName="x2" attributeType="XML" from="219.9375" to="207.1875" begin="117ms" dur="83ms" />
<animate attributeName="y2" attributeType="XML" from="170.999808" to="153.149952" begin="117ms" dur="83ms" />
</line>
</g>
</svg>
Run Code Online (Sandbox Code Playgroud)

更新:我最近得到了它的工作,这是解决方案

使用freeze值为animate …

animation svg

6
推荐指数
1
解决办法
7050
查看次数

标签 统计

animation ×1

ftp ×1

passwd ×1

shell ×1

svg ×1