3 Basic Commands and Simple Shell Scripts Once you have your first Red Hat Enterprise Linux rhel


variables, as they are referred to on many occasions, we can do so by adding - after the su command:[user@rhel-instance ]$ su -



Download 1.85 Mb.
View original pdf
Page4/67
Date26.02.2024
Size1.85 Mb.
#63678
1   2   3   4   5   6   7   8   9   ...   67
Pablo Iranzo Gómez, Pedro Ibáñez Requena, Miguel Pérez Colino, Scott McCarty - Red Hat Enterprise Linux 9 Administration-Packt Publishing (2022) -chap 3 82 - 180
variables
, as they are referred to on many occasions, we can do so by adding - after the su command:
[user@rhel-instance
]$ su -

Password:
Last login mar feb 15 04:57:29 CET 2022 on pts/0
[root@rhel-instance
]#


Basic Commands and Simple Shell Scripts
64
We can also switch from root to user:
[root@rhel-instance
]# su - user

Last login Tue Feb 15 04:53:02 CET 2022 from 192.168.122.1 on
pts/0
[user@rhel-instance
]$

As you can observe, it behaves as if anew login was done, but within the same session. Now, let’s move onto managing the permissions for the different users in the system, as addressed in the following section.
Understanding users, groups, and basic permissions
Multi-user environments are defined by being able to handle more than one user simultaneously. But to be able to administer the system resources, two capabilities help with the tasks Groups: Can aggregate users and provide permissions for them in blocks.
Each user has a primary group.
By default, a group is created for each user and assigned to it as a primary with the same name as the username Permissions: Assigned to files, determining which users and groups can access each file.
Standard Linux (and UNIX or POSIX) permissions include user, group, and others (ugo).
The whole system comes with a set of permissions assigned by default to each file and directory. Be careful when changing them.
There is a certain principle in UNIX that Linux has inherited everything is a file. Even when there maybe some corner cases to this principle, it remains true on almost any occasion. It means that a disk is represented as a file in the system (in other words, such as /dev/sdb mentioned in the installation, a process can be represented as a file (under /proc), and many other components in the system are also represented as files.
This means that, when assigning permissions to files, we can also assign permissions to many other components and capabilities implemented by them by virtue of the fact that, in Linux, everything is represented as a file.

Download 1.85 Mb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   67




The database is protected by copyright ©ininet.org 2024
send message

    Main page