In this article, I will talk about the GNU Nano tool, user groups and administrator privileges in the command system.
The first thing you need to know is that you can basically use the Linux terminal with two different identities: administrator and user. With the user ID, you can only access files in your home directory. The Admin ID puts the entire system at your disposal. To switch from the user console to the admin console, you need to issue the su command. It will ask you for the administrator password you entered while installing Pardus. To exit the admin console and return to the user, you need to issue the exit command. I do not recommend using the console as an administrator. For this reason, I will explain how you can issue administrator-authorized commands with the user ID. We will use the sudo tool for this. First of all, you should know what the GNU Nano tool is, one of the cornerstones of the Linux console.
DICTIONARY
Groups: an authorization to a user grubdon't add it to that user grubGrants access to files and system tools in the definition of (For example; audio grubproviding access to audio tools).
gpasswd -a
add users to groups with user group command; gpasswd -d
You can remove the user from the group with the user group command. Both these commands must be given with administrator privileges.
For a list of all groups and their members cat /etc/group
You must enter the command.
Man: User guides for Linux programs. man program_adı
run with the command. to exit q
Just press the button.
~/ : Abbreviation for home directory. You can use it while giving commands or opening files.
Root: This word, which means root in English, is also used in the Linux jargon to mean the administrator who is authorized to take any action.
GNU Nano
The most user-friendly of text editors running from the console. I will only mention its simple usage. If you want to know all the features man page read.
To make it work nano dosya_konumu
command is used (For example: nano /etc/X11/xorg.conf
). When you want to create a file, enter a command with nano as if you were opening a file (For example: nano ~/yeni_dosya
) and write whatever you want in it and save it. See the shortcuts below for file save, exit, and page navigation.
Nano shortcuts
- F3: registration
- F2: Log out
- Ctrl+V: Next page
- Ctrl+Y: Previous page
Now that we have removed Nano, we can move on to user authorizations. I explained the difference between administrator and user above, now I will explain how you can issue commands from the user account with administrator privileges. There are two ways to this:
- wheel grubwith u
- with visudo file
Wheel grubThe easiest way, made by arranging the flour. All you have to do is wheel your user grubtake it to you. For this to this document You can browse.
visudo
Visudo is the name of the tool that gives users instant administrative privileges. You can make that command an administrator by typing sudo at the beginning of your command. For example, I gave above nano /etc/X11/xorg.conf
if given with user privileges xorg.conf file is opened as read-only because it is outside the user's home directory. But command sudo nano /etc/X11/xorg.conf
as per sudo If you enter it, the command will be processed with administrator privileges and xorg.conf opens as writable.
After that, handle all your operations in the console from your user console by obtaining instant privileges with the sudo command when necessary. You must of course give your user permission to use sudo before using sudo. As I explained above, wheel your user. grubYou can do it by adding it to it, or you can directly give permission by manipulating the visudo file. For this, first su
Switch to the admin console with the command and open the visudo file with the following command:
EDITOR = nano visudo
In the file that opens, find the following section:
#User privilege specification root ALL=(ALL) ALL
There, a bottom line of root, kullanıcı_adı ALL=(ALL) ALL
Add the line and save and exit. Now your user can use the sudo command. If the wheel grubOf course, you don't have to do this if you're a member.
CLUE
Changing forgotten administrator password
GRUB Add the following command at the very end of the boot options of your problematic Linux distribution:
init=/bin/bash
Continue with the enter key. After the command system opens, enter the command below to install your / (root) system as writable.
mount -no remount,rw /
Finally, enter the following command. It will ask you to set the new administrator password.
passwd
(To change the user password passwd kullanıcı_adı
use command.)
reboot
You can restart your computer with the command.
SOURCE:
The original version of this article is the article on page 2009 of the 15th issue of Kurtuluşİçin.com E-Journal published in July 29. To the relevant e-journal from this link accessible.