华强北电脑城 龙岗电子世界 龙华电脑城  凯尔电脑

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1531|回复: 0

ubuntu WINSIP CANNOT

[复制链接]
发表于 2012-9-14 15:53:48 | 显示全部楼层 |阅读模式

ubuntu 服务器默认root是没有激活的,需要用安装系统的用户账号给root设置管理密码:

sudo passwd root

//用sudo修改root帐户

Password: //输入密码

Enter new UNIX password: //提示输入新的root帐户密码

Retype new UNIX password: //再输入一次确认密码

修改成功之后你就可以使用root账号了,可以使用su root 命令切换到root。

但是碰到过一次情况,就是修改之后,直接用root账号无法登陆远程终端,这是还需要修改ssh配置文件:

vi /etc/ssh/sshd_config

修改该配置文件:

# Authentication:

#LoginGraceTime 120

#PermitRootLogin without-password(有的是#PermitRootLogin  prohibit-password)

#StrictModes yes

将 #PermitRootLogin without-password 修改为 PermitRootLogin yes,如下:

# Authentication:

#LoginGraceTime 120

PermitRootLogin yes

#StrictModes yes

保存退出并重启ssh服务既可成功登陆了。

sudo service ssh  restart

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|华强北 电脑城 龙岗电子世界 龙华电脑城 pc4g.com ( 粤ICP备16039863号 )

GMT+8, 2024-9-19 19:30 , Processed in 0.142734 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表