How to Enable and Disable Root Login in Ubuntu

英文文章 专栏收录该内容
30 篇文章 0 订阅

We have recently installed Ubuntu 12.10 Desktop and Ubuntu 12.10 Server, we have nowhere asked to supply root password during installation. Generally in Linux, root user does exist and we need to supply root password during installation. By default root account is disabled in Ubuntu Linux because of security reason and you cannot login as root user directly or su - (Switch User) to become a root. You need to add sudo (superuser do) before actual command if you want to run all administrative commands and you need to supply your password when prompts for password.

Enable Root Login in Ubuntu

Enable or Disable Root Login in Ubuntu

Sudo is allowed user to become superuser for temporary to run superuser administrative tasks.

During installation only allow to create new user which has no root ( aka super user) privileges. But same user is allowed to execute sudo commands. Configuring sudo access for users, need to configure /etc/sudoers.

We’ll be covering the usage of SUDO and also we are going to show you tips & tricks to become root user.

1. How to enable root account?

Enabling root account is not at all require, however you may enable using ‘sudo -i‘ command to enable root access, you need to supply your password.

$ sudo -i

2. How to change root password?

You can change root password with ‘sudo passwd root‘ command as shown below.

$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

3. How to disable root access?

You can disable root access with following command.

$ sudo passwd -l root

You may refer Ubuntu documentation for further information.

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 扫一扫,分享海报

参与评论
请先登录 后发表评论~
©️2021 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值