freebsd handbook 에 잘 나와 있다.
-
https://docs.freebsd.org/en/books/handbook/x11/#x-install
-
The current user must be a member of the video
group. To add a user to video
group, execute the following command:
# pw groupmod video -m username
-
-
이것은 debian 계열 OS에서의 su 및 sudo 사용권한을 사용자의 계정 및 group 설정에 의해 제어하도록 하는 것과 비슷한 것 같다.
-
참고:
https://www.redhat.com/en/blog/linux-groups
-
_( 구글검색: group add in linux )_ 또는 _( 구글검색: group add in freebsd )_
- _( 구글 AI: group add in linux )_
To create a new group in Linux, use the
groupadd
command followed by the group name. For example, sudo groupadd mygroup
creates a group named "mygroup". To verify the group was created, you can check the /etc/group
file or use the getent group mygroup
command. Here's a more detailed explanation:
- Open a terminal: Launch a terminal on your Linux system.
- Use the
groupadd
command: To create a new group, use the following syntax:
Replace
<group_name>
with the desired name for your new group. The sudo
command is needed because you need administrative privileges to create a group. - Verify the creation: You can verify the creation by:
- Checking
/etc/group
: This file contains information about all groups on the system. You can use thecat /etc/group
orgrep <group_name> /etc/group
command to view it. - Using
getent group
: Thegetent group <group_name>
command will display the group's information, including its members, if any.
- Checking
Example:
To create a group named "developers", you would use the command:
Explanation:
groupadd
: This is the command to create a new group.sudo
: This command is used to execute the command with administrative privileges, which are required to modify system files like/etc/group
.<group_name>
: This is the name you want to give to the new group.
Additional notes:
- You can also specify a group ID using the
-g
option:sudo groupadd -g <group_id> <group_name>
. - To add a user to a group, you can use the
usermod
command:sudo usermod -aG <group_name> <user_name>
. - To remove a user from a group, you can use the
usermod
command:sudo usermod -G <new_groups> <user_name>
. This will replace the user's existing supplementary groups with the new list. - To list the groups a user is a member of, use the
id
orgroups
command.
Generative AI is experimental.
-
-
댓글 없음:
댓글 쓰기