Saltar al contenido

Linux How do I enable or disable root user in Ubuntu? – Free software activation has become increasingly popular in …

Linux How do I enable or disable root user in Ubuntu?  - Free software activation has become increasingly popular in ...

Free software has become increasingly popular today. So is the Ubuntu operating system. That is why we must keep in mind that in order to make certain configurations, it is necessary to have a specific authorization. In this article we will teach you how to do this enter superuser or root mode to set up your operating system without restrictions.

What do I need to know about the Ubuntu root user before configuring it?

On most operating systems, users work in it as administrators. That is, they have free access to configure the system. Now, in the case of Ubuntu, you may want to designate a dedicated account to take care of these types of system configurations.

So this account will be gives the user access to all configuration options; while other users use one conventional account separate from the other. This is the special account, which is also known as superuser; the one called root in Ubuntu.

In this way, Ubuntu strengthens the security of your system by limiting certain functions to be performed only by the superuser. Limiting the configuration capabilities of other users; so they do not endanger the system.

Thus, the root user has the ability to run any application in the system; in addition to being able to change read and write permissions on the disk without restrictions. So, it is very important to be aware of the consequences of the settings made.

activate the root user in Ubuntu

Can root access be blocked by SSH?

The restrictions that the Ubuntu superuser root applies to other users is a great advantage protecting system security. However, if SSH access is enabled; root account restrictions can be bypassed.

This can be avoided by making appropriate settings in the SSH file. To do this, you must first go to the system terminal and access via SSH; using the root user. Now you will need to go to the SSH configuration file. This is especially found in «/ etc / ssh / sshd_config».

Next, what you need to do is locate the variable identified as «PermitRootLogin yes»; to change its value to «PermitRootLogin no». Now, to save the configuration, you must restart the server.

In the case of Debian and Ubuntu, this is done in the same way. Applying the «# /etc/init.d/ssh restart» command. So in the end, you will be able to block Ubuntu root access by SSH.

the person is using a laptop

What are the steps to obtain root privileges?

You can enable root access in Ubuntu in two main ways; from the terminal of your graphics system. Regardless of the decision to hire, will allow have access to configuration privileges totally in the system.

Enable terminal root privileges

The first step to becoming a superuser using this method is to enter the command ‘# sudo -i’ in the system terminal. This is to create the root environment within the Ubuntu system.

Then you need to add a password to the root user you created. To do this, you must enter the command «# sudo psswd root». In addition, you will need to re-enter your password to confirm it. This will enable superuser privileges on your system.

So to access these configuration benefits, regardless of the user of the system you are using; you must enter the command ‘# su (password)’. That is, followed by the password you assigned to the root user; such that the system recognizes you as that user.

access to the superuser from the terminal

Graphically enable root privileges

To use this method, you need a tool that allows you to manage groups and system users. Kuser is one of the most used tools of this type. If you have it, after you open it, you will have to enter the administrator password.

Once you have accessed, you need to locate and select the appropriate «User» section; and then the box that identifies the root user. Then in the new window that the system will show you you must enter a new password. You can use the same password you use as an administrator; so as not to confuse or forget your password.

That way, you will have root privileges enabled in the graphical environment. Now, you need to identify yourself as root user in the system terminal by entering the command «#su (password)». This will allow you to make system changes and updates without any problems.

the person uses the ubuntu computer

What do I need to remove or change the root password?

The first requirement to obtain change the root account password in Ubuntu, and even delete that account; is to have access to the root user or superuser. That is, you must have the password that the user has to perform the appropriate configuration; because only the root account user can change their password.

The first step is to access the system terminal and once there; for log in to your root account, enter the command ‘sudo -i’. Then, you need to enter the password that the user has in the system to successfully access the configuration.

Later, to access the user password change configuration, you need to type the command: ‘sudo passwd’. Then you will have to enter a new password which you want to give to the root account of your system. In addition to entering it again to confirm the password change.

Finally enter the command «sudo passwd -l root» at save the information provided in the system. Eventually, you will have successfully changed your password; and you must enter this new password to make advanced configurations in the system.

What are the commands for configuring root in Ubuntu?

To enter a root environment and be able to configure it, you need to use the command ‘root sudo passwd‘.

This way, the system will ask us for the root password, then we have to enter a new password twice. In the end, enter the command ‘sudo su’ and so we check if the root configuration is active.

How can I give root permissions to a user to configure it?

To grant root configuration permissions to a specific user, simply run on the console the command I explained in the previous subtitle in the user session.

Can the root account be disabled in Ubuntu?

In the same way that it is possible to activate the advantages and benefits of the root user in Ubuntu; it is possible to restrict access to that root account by disabling it. This is necessary because using a permanent root account not only allows you to install programs and packages on your system, but also puts the computer system at risk.

Essentially, if used by people who are unaware of the consequences of using root settings.

To disable the root account in Ubuntu you need to go to the system terminal. Later, you have to enter the command ‘$ sudo passwd -l root’. This will disable your root account.

Note that this process can only be performed from the system terminal. So there is no precise method to disable the root account in Ubuntu using the graphical environment. Even if it can be activated graphically.

How do I enable superuser in Ubuntu?

For enable superuser in Ubuntu, we have two ways. However, both can only be accessed from the terminal.

Now the first path consists of write «sudo» at the beginning of any line command that we will use. This way, we tell the console that the command will be executed with superuser privileges.

When used for the first time in the session, we will be asked for the superuser password.

The second method consists of enter the command «sudo su»; we will be asked for the password later. Then, the console cursor symbol will be a «#» symbol instead of «$».

This second method is entered only once during the session, as opposed to the first method, which will need to be entered with each command.