I don't exactly know what I did wrong, but now every command that needs sudo returns: sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin  I found a bunch of answers for fixing this in these situations:  If I was running Linux and could boot with a live USB If I was running Mac OSx.  But I'm running WSL2 in Windows 10, so these answers didn't helped me. Have I rendered my WSL useless? Is there a way to fix this windows-side? Things I've tried in WSL terminal (Ubuntu 20): pkexec chown root:root /etc/sudoers /etc/sudoers.d -R pkexec visudo  Both gives me Error getting authority: Error initializing authority: Could not connect: No such file or directory response. I've also tried su - root, but I put my password and it gives me Authentication failure. Let's suppose this has no answer and I need to reset my Ubuntu WLS install. Is there a way to export everything that I did, installed and all, or will I have to start ALL over? Thanks a lot.
I faced this issue when I want to use sudo command :  sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   then I tried a solution from a similar question in order to change the owner back to the root:   $ pkexec visudo   also I tried this one   $ pkexec chown root:root /etc/sudoers /etc/sudoers.d -R   but I have faced another issue with these commands:   Error getting authority: Error initializing authority: Could not connect: No such file or directory   So is there a solution to this issue?    Full shell issue snippets:   ubuntu@LAPTOP-D4T16P7J:~$ sudo -i sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin ubuntu@LAPTOP-D4T16P7J:~$ pkexec visudo Error getting authority: Error initializing authority: Could not connect: No such file or directory ubuntu@LAPTOP-D4T16P7J:~$ pkexec chown root:root /etc/sudoers /etc/sudoers.d -R Error getting authority: Error initializing authority: Could not connect: No such file or directory     This is my /etc/sudoers file:   ubuntu@LAPTOP-D4T16P7J:~$ cat /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults        env_reset Defaults        mail_badpass Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"  # Host alias specification  # User alias specification  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL  # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL  # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL  # See sudoers(5) for more information on "#include" directives:  #includedir /etc/sudoers.d     OS info:    Ubuntu WSL2.
Is it possible to make an ASP.NET MVC route based on a subdomain? How to disable Windows 10 system log In Windows 10 Resource Monitor I found that the system process is constantly writing C:\ProgramData\Microsoft\Windows\wfp\wfpdiag.etl at like 30-100KB/s. This equals 1TB write/year which is not healthy for SSD. There are other log write like C:\Windows\System32\LogFiles*** too.   Although logs is needed for diagnostics, it's better to be turned on only when problem has already occured.  Is it possible to disable as much system logs as possible to decrease garbage write amoung to SSD? The TweakUI powertoy for Windows XP had an option to auto-login. It stored your password and did the login for you. This was useful, since you kept password protection, but had login programs loaded when you first booted.  When you switched users or hibernated, it would still ask for a password, which is the desired behavior.  Is there a way of doing this in Windows 7? How to efficiently count the number of keys/properties of an object in JavaScript? What's the fastest way to count the number of keys/properties of an object?  It it possible to do this without iterating over the object?  i.e. without doing  var count = 0; for (k in myobj) if (myobj.hasOwnProperty(k)) count++;   (Firefox did provide a magic __count__ property, but this was removed somewhere around version 4.) Continuous Fibonacci number F(n) Check all dependencies of a Record Type in the Organisation before deactivating it I have a large set of pictures, and I want to apply predefined settings to each using the optional argument of the \includegraphics macro from the graphicx package.  I would like to define the settings once at the top of the file (like \def\settings{width=\textwidth, angle=90}), and then apply them to all of my images so that I can modify all of the settings from one place.  If I run the following code block, it gives me the versions of the error "Package xkeyval Error: 'width=\textwidth, angle=90' undefined in families 'Gin'", which seems to be because it's interpreting my entire group of settings as a single key input.  \documentclass{article} \usepackage{graphix} \begin{document}      \def\settingsA{width=\textwidth, angle=90}     \def\settingsB{page=1, scale=.1}     \def\settingsC{angle=90, scale=.5}      \begin{figure}         \includegraphics[\settingsA]{filename1.png}         \label{fig:oneofonehundred}     \end{figure}      \begin{figure}         \includegraphics[\settingsB]{filename2.pdf}         \label{fig:twoofonehundred}     \end{figure}      \begin{figure}         \includegraphics[\settingsC]{filename3.jpg}         \label{fig:threeofonehundred}     \end{figure}   \end{document}   What is the technique to modify this settings string so that it is interpreted correctly? How do I pass an optional argument that is interpreted as a set of arguments instead of one string?  Thanks in advance! Version of the app: 1.0.51. (It is up to date at the time of writing according to Google Play.)  This started happening after the network problem that happened earlier this morning. Both my tablet and my phone are popping up notifications for events (comments, and probably edits too) that happened prior to the network issue. I had received notifications for these events already and had already cleared them before the network issue happened.  The repeated notifications do not show up in the bar displayed at the top of the Stack Exchange sites. In other words, I get notified again in Android but do not get notified again on the SE web sites. Need linebreaks in some columns of a wide table I am trying to create linebreaks in some of the cells of my table, since I have long sentences and the table doesn't fit on an A4 page. How to let LaTeX choose the linebreaks?  Here is my code   \begin{table}[hbt] \centering \begin{tabular}{lllllll}     \toprule     &amp;  Raumgewicht $\gamma$'$_m$ and [$\frac{kN}{m^3}$] &amp;Reibungswinkel $\phi$'$_m$[]&amp; Kohäsion c'[] &amp; M$_E$-Wert []&amp; N$_SPT$ [] &amp; k-Wert []  \\     \midrule     Auffüllungen/Deckschicht&amp; 18&amp; 27 &amp; 0 &amp; 10* &amp; 17 &amp; -\\     Rückstausedimente nicht vorbelastes&amp; 21 &amp; 28 &amp; 10 &amp; 10 &amp; 15 &amp; $5\times10^-8$ - $1\times10^-6$ \\     Rückstausedimente vorbelastet &amp; 22 &amp; 32 &amp; 10 &amp; &gt;50 &amp; 91 &amp; $5\times10^-8$ - $1\times10^-6$ \\     Moräne &amp; 22 &amp; 36 &amp; 5 &amp; &gt;50 &amp; &gt;100 &amp; $1\times10^-8$ - $5\times10^-6$\\     \bottomrule \end{tabular} \caption{Bodenkennwerte} \label{tab:Bodenkennwerte} \end{table}   My preamble is  \documentclass[12pt,a4paper]{scrartcl} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{booktabs} \usepackage{stackengine} \usepackage[top=3cm, bottom=2.5cm, left=2.5cm, right=2.5cm, footskip = 1cm]{geometry} \usepackage{hyperref} The difference between "have a lunch" and "have lunch" Is there any difference between     I am not having a lunch tomorrow.   and     I am not having lunch tomorrow.   This is a follow up question of : . Can someone please confirm the following? I have a C1/D visa. I worked as a flight attendant (currently unemployed) and entered the US numerous times, and also visited Mexico in December 2017.  I am planning on visiting Mexico again for 3 weeks in due course. Will the C1/D allow for me to transit in the US and visit Mexico or do I need a B1/B2 visa? I had issues with CBP before as it seems to be a very grey area.  According to the Mexican Consulate in South Africa, the type of visa is irrelevant. As long as it is multiple-entry, I am good to go.  Can someone please confirm, as I cannot get a solid answer from anyone?  Thank you! Density function for RV The density function for a random variable X is given in terms of a constant $c$.  Find the value of $c$.  What is the corresponding distribution function?  Sketch both the density and the distribution functions. Finally, find the probabilities.  5.1 $f(x)=0$ for $x&lt;0$ and $f(x)=\frac{c}{(x+1)^4}$ for $0&gt;x$   $P(X&gt;4)$  $P(X&lt;2)$  $P(1\le\ X&lt;3)$   I get $c=3$ by taking the integral, and then I am a little confused as to why  $F(x)=1-\frac{1}{(x+1)^3}$  Is that because in solving for $c$, I ended up with $1=\frac{c}{3(x+1)^3}$, so substituting c in I get $1=\frac{1}{(x+1)^3}$?  And, then  $P(X&gt;4)=1-P(X\le\ 4)$ $=1-(1-{1}{(1+4)^3})$ $=1/125$  $P(X&lt;2)=1-{1}{(1+2)^3}$ $=26/27$  I guess I am a little confused about what $F(x)$ and $f(x)$ actually MEAN? And thus that leads to my confusion about what the differences between $&gt;$ and $&lt;$ and greater than or equal to are, etc etc in terms of the equations. The ones above I solved by comparing to the book but I still don't understand what they mean really.  So as a result, I don't really get how to solve $P(1\le\ X&lt;3)$.  5.2 $f(x)=ce^x$ for $x&lt;0$ and $f(x)=ce^{-x}$ for $0&gt;x$  5.3 $f(x)=0$ for $x&lt;-1$ or $x&gt;2$ and $f(x)=cx^2$ for $-1&lt;x&lt;2$ How can I check if a directory exists in a Bash shell script? What command can be used to check if a directory exists or not, within a Bash shell script? Definite article, repetition in lists Which would be correct?        The fridge, the shelves, the walls, the floor, and John himself, were all covered in foam.   The fridge, shelves, walls, floor, and John himself, were all covered in foam.      The the can be applied to all the nouns, so is there a need to repeat it? What is the gradient of $f(x, y, z) = \sqrt{x^2+y^2+z^2}$? What is the gradient of $f(x, y, z) = \sqrt{x^2+y^2+z^2}$?  I know that $\nabla f = \left\langle\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z}\right\rangle$ or equivalently $\nabla f = \frac{\partial f}{\partial x}\mathbf{i} + \frac{\partial f}{\partial y}\mathbf{j} + \frac{\partial f}{\partial z}\mathbf{k}$.  Eventually, I am going to evaluate this gradient at a point and then dot it with some given unit vector to find a directional derivative. I think maybe what is troubling me is the radical in $f$. Will I have to use the chain rule in order to find the three partial derivatives?  I tried this:  $$\frac{\partial f}{\partial x} = \frac{1}{2}(x^2 + y^2 + z^2)^{-\frac{1}{2}}2x$$ $$= \frac{x}{\sqrt{x^2 + y^2 + z^2}}$$  That result looks ugly to me. However, if I did that partial derivative correctly, then I think I know what I am doing. This image from wikipedia, explains that there occurs a potential drop across a , and an electric field confined to the depletion region.  I already know the reason for the existence of this drop and the calculation of the difference but I have two questions regarding this drop.    1) If the  regions are externally connected using a perfectly conducting wire, why will not any current flow? Connecting the two regions should equalize their potentials (since wire is a resistance less) conductor, and therefore the gradient at the junction is destroyed resulting in a  which is obviously against conservation of energy as the semiconductor has non-zero resistivity. Where will extra potential drops will be created so that Kirchoff's voltage rule holds without any current and the built-in potential difference $V_o$ of the juction persists?    2) (probably naive) If an external Bias is applied, of say $|V|&lt;|V_o|$, then the pn potential difference across the junction will just reduce by that amount ($|V|$). Assuming that the external voltage source is ideal without any resistance, what will be the potential drops which would sum to zero in this case? Will drop due to the resistance of semiconductor play a par in it? If yes, then there cannot be any ideal resistance-less semiconductor junction, can there? Now that Apple has removed the ability to access the iOS App Store in iTunes 12.7 on Mac/Windows , I can't find any way to download an IPA file from the App Store. As a note, I'm not worried about installing the IPA files (see ), I just need the IPA files as a developer looking for some basic information on the apps. I'd like to solve this without resorting to jailbreaking as my devices are already updated to iOS 10.3.3.  Here are things that I've tried that didn't work:   Extract from backup: The apps seem no longer to be backed up. Save to Mac from iPhone management software: I believe this has been blocked by Apple works as far back as iOS 8.3. Figuring out how the file is downloaded via proxy connection: At least for me, this looks too complicated to do because you have to authenticate with your Apple ID and I'm sure that by now, Apple even requires the phone to be authenticated in some way. Not sure if it would even be possible in the same way that you see all those Android APK download services out there.   At least for now, it looks to me like maybe the only way is to hold onto an older version of iTunes for as long as that works. NSDate Format outputting wrong date How to add a directory to the PATH? cp vs. mv: which operation is more efficient? I find myself moving reasonably large amount of data (20+ GB) from one directory tree to other. Often times they are on the same filesystem but sometimes they are on different ones. I do cp just to preserve the original data just-in-case. Once the copy is done I delete the original data after verifying that the data has been copied alright. Sometimes I just do mv if I feel too lazy to clean original data afterwards. However, I am wondering, from purely technical point of view, which operation is more efficient? Why?