Включить суперпользователя 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.

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: 12146 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

Источник

Как стать суперпользователем в Linux

В создании этой статьи участвовала наша опытная команда редакторов и исследователей, которые проверили ее на точность и полноту.

Команда контент-менеджеров wikiHow тщательно следит за работой редакторов, чтобы гарантировать соответствие каждой статьи нашим высоким стандартам качества.

Количество просмотров этой статьи: 105 805.

Учетная запись суперпользователя в Linux предоставляет полный доступ к системе. Права суперпользователя (администратора) необходимы для выполнения команд в Linux, особенно тех команд, которые затрагивают системные файлы. Так как аккаунт суперпользователя имеет неограниченный доступ к системным файлам, рекомендуется получать права суперпользователя только при необходимости, а не входить в систему в качестве администратора. Это поможет предотвратить случайное повреждение важных системных файлов.

Читайте также:  How to unpack tar gz linux

Получение прав суперпользователя через терминал

Изображение с названием Become Root in Linux Step 1

Изображение с названием Become Root in Linux Step 2

Введите . su — и нажмите ↵ Enter . С помощью этой команды можно войти в систему в качестве суперпользователя. Используйте указанную команду для входа в систему в качестве любого пользователя, но если команда не содержит имени пользователя, вы войдете в систему как администратор. [1] X Источник информации

Изображение с названием Become Root in Linux Step 3

  • Если появилось сообщение об ошибке аутентификации (authentication error), скорее всего, учетная запись суперпользователя заблокирована. Чтобы узнать, как разблокировать аккаунт, прочитайте следующий раздел.

Изображение с названием Become Root in Linux Step 4

Обратите внимание на приглашение на ввод команды (в окне терминала). Если вы получили права суперпользователя, в конце приглашения на ввод команды вместо значка $ появится значок # . [2] X Источник информации

Изображение с названием Become Root in Linux Step 5

Введите команды, на исполнение которых нужны права суперпользователя. После входа в систему с помощью команды su — и получения прав суперпользователя можно запускать любые команды, которые требуют административного доступа. Активность команды su — сохраняется до конца сессии, поэтому пароль суперпользователя не нужно вводить каждый раз, когда необходимо выполнить очередную команду.

Изображение с названием Become Root in Linux Step 6

  • Введите sudo команда и нажмите ↵ Enter (например, sudo ifconfig ). Введите свой пароль пользователя, а не пароль суперпользователя.
  • Команду sudo рекомендуется использовать в некоторых дистрибутивах Linux, например, в Ubuntu, потому что она работает даже тогда, когда учетная запись суперпользователя заблокирована.
  • Эта команда доступна пользователям с правами администратора. Добавить или удалить пользователя можно в /etc/sudoers .

Источник

Enable root login from GUI

I just installed Mint 16 and I see that root user is not available at login screen. I log in from normal user and went to «Login Window» option and there I set «Allow root login». Then I restarted the PC and still I don’t see root user in login window. I also did the below but it also didn’t work.

sudo passwd root sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf' 

Why in the world are you trying to log in as Root on a GUI? There’s good reason why they make it so hard to do, and you’re doing something seriously wrong if you think you require it.

On some systems and DEs, only users above UID 1000 (conventionally, non-system users) are displayed by the login manager. This is also why you don’t see postfix , www-data , mail and so on.

3 Answers 3

Linux Mint 16 uses the Mint-X theme by default which only displays the password box for chosen non-root users. In order to enable the User entry field (from which you will be able to specify root) do this. From Menu ==> Administration ==> Login Window ==> Theme choose Clouds and logout.

Читайте также:  Checking mail server on linux

When you login, it is necessary to enter the username root, followed by the password. The user root doesn’t show in the list of users but you will be able to login as root this way.

Usual warnings of root login is dangerous, do not use unless you are expert.

Linux Mint Rebecca 17.1 uses nemo desktop as do others. root login text has been moved to: /usr/share/mdm/defaults.conf line 185. those who don’t know how, this is what to do.

Open Terminal and type sudo passwd root you will be prompted for a new root password.

Next type, sudo gedit /usr/share/mdm/defaults.conf the file will open in read/write mode fr editing. hit ctrl — f to search for root login it will highlight in yellow, change false to true and save. reboot to greeter with root login.

[security] # Allow root to login. It makes sense to turn this off for kiosk use, when # you want to minimize the possibility of break in. AllowRoot=true

You can root the system via terminal, so that you get total access to everything. The first thing you need to do is to change the type of user you are, if you open the terminal, you’re probably going to see this symbol next to your user-name: $. If you were a su (super user), the symbol you would see would be this one: #. To become a su you’ll have to change the su password by typing sudo passwd root . Now it will ask you to create a new password, and confirm it twice. Once you’re down, you just have to type su — and then enter the password you changed before. That’s it, you now have total access to everything.

Just a quick word about terminology. The command /usr/bin/su is called substitute user or colloquially switch user. It is not specifically intended for only switching to the root account. Also, the term superuser is quite common in *NIX and other systems, but it is not really part of the default group names in most distributions (all distros that I know of. we call it superuser but I’ve never seen it in the system itself).

You must log in to answer this question.

Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Источник

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