-
ubuntu 12.04创建多用户及开启telnet远程登录1.ubuntu 创建/删除用户及修改密码以root帐户登录,创建新用户:运行:$ sudo adduser tete正在添加用户"tete"...正在添加新组"tete" (1002)...正在添加新用户"tete" (1002) 到组"tete"...创建主目录"/home/tete"...正在从"/etc/skel"复制文件...输入新的 UNIX 口令:重新输入新的 UNIX 口令:passwd:已成功更新密码Changing the user information for teteEnter the new value, or press ENTER for the defaultFull Name []:Room Number []:Work Phone []:Home Phone []:Other []:这个信息是否正确? [Y/n] y输入“y”后按回车就OK了!2.删除用户:语法:userdel [-r] [要删除的用户的名称]例如:[root@localhost ~]userdel -r tete3.修改用户密码:该命令的一般格式为: passwd [用户名] 其中用户名为需要修改口令的用户名。只有超级用户可以使用“passwd 用户名”修改其他用户的口令,普通用户只能用不带参数的passwd命令修改自己的口令。该命令的使用方法如下:输入passwd< Enter>;在(current) UNIX passwd:下输入当前的口令在new password:提示下输入新的口令(在屏幕上看不到这个口令):系统提示再次输入这个新口令。输入正确后,这个新口令被 加密并放入/etc/shdow文件。选取一个不易被破译的口令是很重要的。选取口令应遵守如下规则:口令应该至少有六位(最好是八位)字符;口令应该是大小写字母、标点符号和数字混杂的。超级用户修改其他用户(xxq)的口令的过程如下,# passwd rootNew UNIX password:Retype new UNIX password:passwd: all authentication tokens updated successfully#[附:用“su”命令来更换用户,如:$su demo]4.开启telnet远程登录(1)由于ubuntu12.04没有/etc/inetd.conf,故不需要对其进行配置(2)安装软件sudo apt-get install xinetd telnetd(3)配置/etc/xinetd.conf和/etc/xinetd.d
- 修改/etc/xinetd.conf如下
# Simple configuration file for xinetd## Some defaults, and include /etc/xinetd.d/defaults{# Please note that you need a log_type line to be able to use log_on_success# and log_on_failure. The default is the following :# log_type = SYSLOG daemon infoinstances = 60log_type = SYSLOG authprivlog_on_success = HOST PIDlog_on_failure = HOSTcps = 25 30}includedir /etc/xinetd.d#红色部分具体不知到什么参数- 目录/etc/xinetd.d下面就是要启动的服务
新建telnet内容:touch telnet编辑内容如下:service telnet{ -
disable = noflags = REUSEsocket_type = streamwait = nouser = rootserver = /usr/sbin/in.telnetdlog_on_failure += USERID
-
}运行sudo /etc/init.d/xinetd restarttelnet localhost 可以发现telnet服务已启动。
ubuntu 12.04创建多用户及开启telnet远程登录
最新推荐文章于 2018-12-09 13:22:52 发布