执行这两条命令,即将当前用户加入tcpdump
组,然后通过查询查看结果groups
。但是,为什么groups
不报告我是会员tcpdump
?
来自 Ubuntu 22.04 的屏幕截图:
这时候,我检查了/etc/group
文件,它已经被添加了。
tcpdump:x:117:chj
为了看到命令中tcpdump
列出的groups
内容,我必须完全注销我的桌面会话,然后重新登录。
怎么一定要这么麻烦?我错过了什么吗?
我已经使用 chgrp 命令更改了用户的默认组。之后,对于 sudo yum install update 等基本命令,我收到错误消息“'用户名'不在 sudoers 文件中。将报告此事件”。
任何想法。非常感激。
我如何使用“ chage ”命令更改组中每个用户的密码更改前的最少天数?
我已经安装了 Ubuntu 18.04,但应用程序(Skype、Cheese)说找不到设备。
我已经审查了有关该主题的几个主题,但似乎没有一个有效。谢谢!
编辑:一开始的输出ls -l /dev/video0
是:
ls: Cannot access an '/dev/video0': file or directory does not exist.
然后当我把
sudo mknod /dev/video0 c 81 0
我们的输出ls -l /dev/video0
是:
crw-r--r-- 1 root root 81, 1 Apr 19 22:25 /dev/video0
输出getfacl /dev/video
和ls -ltrh /dev/video*
输出lsusb
和v4l2-ctl --list-devices
通过终端输出“奶酪”。当相机被激活时,它会说:“没有找到设备”
我正在使用 Ubuntu 18.04。我想将我的用户“davea”添加到组“www-data”中。我试过这个
(venv) davea@chicommons-laboratory:/var/www/html/web$ groups
davea sudo
(venv) davea@chicommons-laboratory:/var/www/html/web$ sudo usermod -a -G www-data davea
[sudo] password for davea:
(venv) davea@chicommons-laboratory:/var/www/html/web$ groups
davea sudo
但是正如您所看到的,即使该命令没有给出任何错误,我的用户仍然没有添加到组中。我究竟做错了什么?
我在这个问题上咬牙切齿:我正在尝试transmission-daemon
使用incomplete
anddone
目录进行设置。下载到incomplete
确实可以正常工作,但是对于done
目录,我一次又一次地收到拒绝权限:
Feb 22 10:40:25 my-nas transmission-daemon[31244]: [2020-02-22 10:40:25.041] TORRENT tr_fdFileCheckout failed for "/srv/7e5e6032-1f1c-4efc-a74d-f3fe95fe606f/torrent/done/TORRENT/TORRENT_meta.sqlite.part": Permission denied (inout.c:102)
Feb 22 10:40:25 my-nas transmission-daemon[31244]: [2020-02-22 10:40:25.041] TORRENT Permission denied (/srv/7e5e6032-1f1c-4efc-a74d-f3fe95fe606f/torrent/done/TORRENT/TORRENT_meta.sqlite) (TORRENT.c:537)
即使我已经按照这样的说明为user 设置了正确的权限debian-transmission
。
这些是文件夹的权限incomplete
(我可以下载到):
$ getfacl incomplete
# file: incomplete
# owner: user
# group: debian-transmission
# flags: -s-
user::rwx
user:debian-transmission:rwx
user:user:rwx
group::rwx
group:mysql:rwx
mask::rwx
other::r-x
default:user::rwx
default:user:debian-transmission:rwx
default:user:user:rwx
default:group::rwx
default:group:mysql:rwx
default:mask::rwx
default:other::r-x
对于done
(我无法下载到):
$ getfacl done/
# file: done/
# owner: user
# group: debian-transmission
user::rwx
user:debian-transmission:rwx
user:user:rwx
user:stack:rwx
group::rwx
group:mysql:rwx
mask::rwx
other::r-x
default:user::rwx
default:user:debian-transmission:rwx
default:user:user:rwx
default:user:stack:rwx
default:group::rwx
default:group:mysql:rwx
default:mask::rwx
default:other::r-x
据我所知,用户debian-transmission
确实有rwx
权限?我不确定,因为我不是 100% 熟悉 ACL。我怎么解决这个问题?
我的主文件夹中有一个目录,我希望其他用户能够访问该目录。我为他创建了一个小组,我们都加入了,我做到了
sudo chgrp -R group folder/
他仍然无法进入目录,权限被拒绝。我也做过
sudo chmod -R 777 folder/
无济于事。为什么这不是工作?谢谢。
我正在以编程方式删除 /etc/group 中的条目。
因为我不能在这个练习中使用 grep、cat 或 cut,所以我编写了自己的程序,它可以生成 stdout 和 stdout 数据来读取文件。如果你可以用 grep、awk、sed、cat、echo 等写出你的解决方案。我可以使用它。
我有 root 访问权限并且可以手动删除组,但由于 n 个组将包含一个“+”字符,我需要一个脚本来检查这个。
首先,我假设我可以在任何行中添加包括“+”的 #,但我现在确信这不是您以编程方式管理 /etc/groups 的方式。我还没有找到很好的文档,想知道这里是否有人对如何通过使用“+”字符来禁用被认为是“遗留”的组有更好的想法。
我有很多用户和两个组。其中一些是 group1 的成员,另一些是 group2 的成员。我想允许 group1 访问所有目录,我想允许 group2 访问特定目录。我做了一些研究,但我无法修复它。我怎样才能做到这一点?
谢谢。
根据这个关于 docker的问题的答案,以非 root 身份运行它就像将非 root 用户名添加到docker
组中一样简单,然后注销并重新登录。果然,当我将它sudo
用于hello-world
图像时进展顺利。但是对于另一个名为的测试图像,whalefortune
我仍然得到access denied
错误——见下文。
通常不再可能以非 root 身份运行 docker 吗?我使用的是 Ubuntu 19.04,它是比示例更新的版本,并且有人提到以非 root 身份运行 docker 可能存在安全漏洞。
我的想法是以普通用户身份运行 nvidia-docker,这可能(甚至是一个好主意)吗?
$ sudo docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:6540fc08ee6e6b7b63468dc3317e3303aae178cb8a45ed3123180328bcc1d20f
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64)
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
$ docker run --rm dbkdoc/whalefortune
docker: Got permission denied while trying to connect to the
Docker daemon socket at unix:///var/run/docker.sock:
Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create:
dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.