Настройка root linux mint

Linux Mint Forums

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

How to log in as «root» in Mint 20?

Post by Fran_3 » Fri Aug 14, 2020 9:30 am

Some online tutorials first say «log in as root»
I have Googled how to do this but the answers are confusing. ranging from. no root anymore, use «su», use «su» then rename the user, etc, etc, etc

So, let me ask it here. if I have my Linux Mint 20 open, I’m logged in as me. and go to the command line. aka. shell, terminal, console, prompt, etc

and an online tutorial instructs me to «log in» as «root» .

1 — should I log out as «me» and log in as «root» and if so how?
2 — just type su at the prompt
3 — or what?

Thanks for helping me clear this up.

Re: How to log in as «root» in Mint 20?

Post by rene » Fri Aug 14, 2020 9:45 am

Login in graphically as root, i.e., from the actual login screen, is something you should not do. Logging in as root on a so-called virtual console (a text console) is generally OK but never mind, since unlikely to be that which whatever you’ve been reading is referring to. From a terminal opened as yourself, just type sudo -i to open a root shell to work from — but note that rather than doing everything as root as you will from that point on in that terminal do, it’s generally best to prefix individual commands with sudo instead.

Читайте также:  Create own service linux

Re: How to log in as «root» in Mint 20?

Post by Fran_3 » Fri Aug 14, 2020 10:13 am

what is the difference between using «sudo -i» and in using «su» ?

Once I execute «su» how do I later get back to being logged in as me?

Re: How to log in as «root» in Mint 20?

Post by Hoser Rob » Fri Aug 14, 2020 10:43 am

Which tutorials? I’ve been using Linux for a while and have never set a root password. sudo should work.

AndyMH Level 20
Posts: 12135 Joined: Fri Mar 04, 2016 5:23 pm Location: Wiltshire

Re: How to log in as «root» in Mint 20?

Post by AndyMH » Fri Aug 14, 2020 12:46 pm

For starters, the root account is not activated by default and second, you don’t need it, any command that needs admin privileges you prefix with sudo as already said.

If you want to know more about any terminal command then man command , e.g. man sudo

 -i, --login Run the shell specified by the target user's password data‐ base entry as a login shell. This means that login-specific resource files such as .profile or .login will be read by the shell. If a command is specified, it is passed to the shell for execution via the shell's -c option. If no command is specified, an interactive shell is executed. sudo attempts to change to that user's home directory before running the shell. The command is run with an environment similar to the one a user would receive at log in. The Command environment section in the sudoers(5) manual documents how the -i option affects the environment in which a command is run when the sudoers policy is in use
andy@T430 ~ $ sudo -i [sudo] password for andy: root@T430:~# 

Thinkcentre M720Q — LM21.1 cinnamon, 4 x T430 — LM20.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0

Читайте также:  Настроить сервер ntp linux

Источник

How to Change Root Password in Linux Mint 21

In a Linux system, a person with root privileges would be able to work as an administrator. Most of the Linux tasks required root-level permission to further proceed. It is quite possible that most of the users working on the same system have root privileges which sometimes create security problems.

However, to avoid security attacks, it is necessary to change the root password regularly. Because resetting the password time to time helps you to get rid of these issues, even if your ex-team member finds your old password, they wouldn’t be able to access the system.

How to Change Root Password in Linux Mint 21

We have two most common ways to change root password on Linux Mint 21 system:

1: Change root Password with sudo Permission

With sudo privileges, a user can easily modify the root password if forgotten or even set it for the first time. But keep in mind, you should know about the older password. Whenever you run the mentioned command, the system will ask you to type the sudo password; type it and hit enter:

In the next move, you will be asked to type the new root password for the Linux mint system:

Re-enter the new root password you have set above for confirmation:

Once both passwords match, you will get a message on terminal that you have successfully updated Linux Mint root password.

2: Change root Password with root Permission

For this method, you should have changed the root password of the Linux Mint system at least one time before. And, you must know the current sudo password to gain root privileges. So, execute the mentioned command and type the current root password of your Linux system:

Читайте также:  Find system info linux

In the next command, execute the ‘passwd’ command to the terminal for further process. This will allow you to modify the root password:

Type the new password you want to set, and hit Enter:

Re-enter the password you have set above. You will receive a successfully updated message if the password is entered correctly:

3: Change root Password Using GUI

You can also change the root password through a graphical user interface if you don’t prefer the terminal.

What you need to do is, open the applications menu, move to the Administration icon and their select Users and Groups option:

Type the current root password and click to Authenticate button:

After authentication, you will see a user with their respective details like name and password. In the password category, click on the dotted hidden password to reset it:

Once you clicked, a dialogue box of Change Password will be appeared on the screen:

Type the new password of your choice in the New Password entry and re-write it on the Confirm Password tab. If your passwords match, then hit to Change button:

The root password of the Linux Mint 21 system has changed successfully.

Conclusion

Root password is the key to managing your whole Linux system as all administration tasks and queries are handled with root permission. Sometimes, it is necessary to change the root password after some time to avoid unnecessary usage and attacks.

Through this guide, we have learned how to change the root password on Linux Mint 21 system. We have done it using two different approaches, one approach leads to CLI which includes sudo and root permissions. And in the second approach, we used the GUI method.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.

Источник

Оцените статью
Adblock
detector