ubuntu配置登陆用户为root

2018-05-15  本文已影响0人  新手上路i

## 更改默认登陆用户

```

root@liusiyao:~# vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

[Seat:*]

user-session=ubuntu

[SeatDefaults]

autologin-user=root      ##这里更改用户

user-session=ubuntu

greeter-show-manual-login=true

```

```

root@liusiyao:~# vim /root/.profile

# ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then

  if [ -f ~/.bashrc ]; then

    . ~/.bashrc

  fi

fi

tty -s && mesg n || true    #要添加的

```

## 关于ssh设置

```

vi /etc/ssh/sshd_config  #调整PermitRootLogin参数值为yes

```

## 重启ssh服务

```

service sshd restart

```

上一篇 下一篇

猜你喜欢

热点阅读