-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't disable the sudo's password. #20
Comments
x11docker sets up a new Instead, you can allow a passwordless sudo with:
Compare mviereck/x11docker#27 (In general, could you please ask general x11docker question in the x11docker repo? In the deepin repo ask questions that directly target |
Why is it designed with this working mode? Can I let x11docker work with a normal way which respects the stuff resides in /etc/sudoers.d/ and don't change the default
This will flush the original content in In addition, can I create the corresponding BTW, how to set an empty password for sudo via x11docker's option?
Thanks for your suggestion. I will adopt it from now on. |
This is part of the security concept of x11docker.
This is possible with
There is no direct option because I discourage passwordless sudo. However, you could execute the two commands with option
You can make a shortcut of this with option |
What content for this example should I use to obtain the predefined options stored in a file named as FILE? |
Example:
Please update x11docker first, just found a parsing bug in Use e.g. as
|
Got it. Thanks for your concrete and clear example. Maybe tings like this should be added to the manual/document. Anyway, it seems to me that x11docker is not so easy to understanding, mastering and using. |
Do you think the above two lines are enough? See for my case, I've the following contents in
|
They are enough to get it working. |
I've made a mistake: With option
|
I tried this method, but find that the $USER variable can't be expanded. This can be confirmed, in the container, by checking the content of
The content of the preset FILE, i.e., nopasswd, need to be rewritten as below:
Or directly run x11docker with the following command:
But I still don't know how to directly use the here-doc based method in the preset FILE, i.e., nopasswd used for this case. Regards |
Just found this happened if using
This introduces an issue:
This is not possible because x11docker removes newlines in the preset file. |
If we want to add many lines into /etc/sudoers, the here doc based method is more convenient, for example, the following:
|
Yes, of course. But I cannot change the behaviour of option |
By saying backwards compatibility, do you mean compatible with previous versions of x11docker or docker itself? Anyway, you can set the different behaviors, based on version checking, for the same option, if you want to do so. |
I mean previous versions of x11docker.
It would require a major version bump to 7.0. |
I try to disable the password for current user in invoking sudo command but failed. See the following info shown in the deepin container started by x11docker.
The screenshot is shown below:
As you can see, I've created the
/etc/sudoers.d/nopasswd
for the current user, why still I need to input password when running sudo command?Regards,
HY
The text was updated successfully, but these errors were encountered: