I am trying to restart a service without being root. Here is the code snippet where the command being used template {   source      = &quot;{{vault_template_dir}}/agent.crt.tpl&quot;   destination = &quot;{{vault_tls_dir}}/agent.crt&quot;   command     = &quot;/usr/bin/systemctl restart vault.service&quot; }  after researching and reading similar issues, I've tried to give a limited sudo command for the group I an using (user=vault, group=vault) by editing the /etc/sudoers file and adding the following line: %vault ALL=(root) NOPASSWD: /usr/bin/systemctl restart vault.service  However, I am still getting an error when I try and run the command. error log file: Apr  4 23:27:41 xxxxxx vault[133973]: Failed to restart vault.service: Interactive authentication required.  vault.service [Unit] After=network.service hostname.service consul-init.service consul.service Description=&quot;Hashicorp Vault - A tool for managing secrets&quot; Documentation=https://www.vaultproject.io/docs/ StartLimitInterval=200 StartLimitBurst=5  [Service] User=vault Group=vault ExecStart=/usr/bin/vault server -config=&quot;{{vault_server_config_file}}&quot; ExecReload=/usr/bin/kill -HUP $MAINIP CapabilityBoundingSet=CAP_SYSLOG CAP_IPC_LOCK LimitNOFILE=65536 LimitMEMLOCK=infinity Restart=always RestartSec=30  [Install] WantedBy=multi-user.target  can someone please help me with this issue?
I have a service (kado-demo.service) that a normal user (kado) should be able to restart without entering any password.   I created /etc/sudoers.d/user_restart and added  kado ALL=NOPASSWD: /bin/systemctl restart kado-demo.service   Permissions:  -r--r-----   1 root root   585 Mar  5 10:47 user_restart   As user k, I now should be able to execute the given command, but this happens:  /bin/systemctl restart kado-demo.service  ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===  Authentication is required to restart 'kado-demo.service'.   Multiple identities can be used for authentication:   (...)   Which is the same result as before I added the file.   The /etc/sudoers contains  #includedir /etc/sudoers.d   And I even get the same result when I add content of the user_restart file directly to /etc/sudoers.  I'm running out of ideas...
What is the benefit of review a scientific paper as a referee? My wife has several files and folders that somehow ended up having filenames that have caused them to be undeleteable (can't be deleted) by normal means or via the command line. I believe the filenames are too long due to the depth of the folder structures. Does anyone know of a good utility for cleaning up files like this? Calculate $\sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k}$ fastest way to detect if a value is in a group of values in Javascript I have a group of strings in Javascript and I need to write a function that detects if another specific string belongs to this group or not.  What is the fastest way to achieve this? Is it alright to put the group of values into an array, and then write a function that searches through the array?  I think if I keep the values sorted and do a binary search, it should work fast enough. Or is there some other smart way of doing this, which can work faster? I was trying to install minted package in TeXLive. I installed it and then run sudo tlmgr update --all. It was running slow so I stopped it using Ctrl+Z in an ubuntu terminal and then I run sudo tlmgr update --list. After that I installed texlive-latex-extra and python-pygments. Later on I run sudo tlmgr update --all again and let it finish.  After that I am trying to run a simple code using listings and greek but I get an error     Bad Character code (256)   A MWE that illustrated the problem is the following  \documentclass{book}  \usepackage[english,greek]{babel} \usepackage[iso-8859-7]{inputenc} % %\usepackage[utf8]{inputenc} \usepackage{kerkis} \usepackage{pifont} % %  \newcommand{\sw}{\selectlanguage{english}} \newcommand{\sq}{\selectlanguage{greek}} \newcommand{\eng}[1]{\latintext#1\greektext} \newcommand{\gre}[1]{\greektext#1\latintext}  \usepackage{xcolor} \usepackage{listings} \usepackage{textcomp}  \definecolor{listinggray}{gray}{0.9} \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}  \lstdefinestyle{JavaStyle}{         backgroundcolor=\color{lbcolor},     tabsize=4, %   rulecolor=,     language=Java,      % choose the language of the code         basicstyle=\scriptsize,     % the size of the fonts that are used for the code         upquote=true,         aboveskip={1.5\baselineskip},         columns=fixed,         showstringspaces=false,         extendedchars=false,         breaklines=true,         prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},         frame=single,         numbers=left,         showtabs=false,         showspaces=false,         showstringspaces=false,         identifierstyle=\ttfamily,         keywordstyle=\color[rgb]{0,0,1},         %commentstyle=\color[rgb]{0.026,0.112,0.095},         commentstyle=\itshape\color{green!40!black},         stringstyle=\itshape\color{red!90!black},         numberstyle=\itshape\color{yellow!50!black} }  \lstdefinestyle{CppStyle}{         backgroundcolor=\color{lbcolor},     tabsize=4, %   rulecolor=,     language=C++,       % choose the language of the code         basicstyle=\scriptsize,     % the size of the fonts that are used for the code         upquote=true,         aboveskip={1.5\baselineskip},         columns=fixed,         showstringspaces=false,         extendedchars=false,         breaklines=true,         prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},         frame=single,         numbers=left,         showtabs=false,         showspaces=false,         showstringspaces=false,         identifierstyle=\ttfamily,         keywordstyle=\color[rgb]{0,0,1},         %commentstyle=\color[rgb]{0.026,0.112,0.095},         commentstyle=\itshape\color{green!40!black},         stringstyle=\itshape\color{red!90!black},         numberstyle=\itshape\color{yellow!50!black} } \begin{document}  This is a dummy text. kjhbki \end{document}   The .aux file says  \relax  \select@language{greek} \@writefile{toc}{\select@language{greek}} \@writefile{lof}{\select@language{greek}} \@writefile{lot}{\select@language{greek}}   while the .log file can be found   Any idea why is this happening and how to fix this? Note that if I remove the listings preamble, delete all produced files and build the document, everything works fine. How to copy the complete folder structure one location to another location include all files and sub folders I have folder structure like in Shared documents/East using CSOM and C# Main Folder   Folder1   Folder2      File1      File2  I have to copy all folders with files to Shared documents/West .... I lost the source code from one project I did on the company I'm working for and haven't been able to find a Visual Basic 6 decompiler; does that even exists?  I only have the EXE that I've rescued from a user's machine. How can I use Gmail (in Chrome) as the default email handler in Windows 8?  I used to use GmailNotifier in Windows 7, but that doesn't seem to work anymore. Clicking on a mailto: link simply opens Chrome with a blank page.  I am not interested in using the Mail app built into Windows 8. What's the best way to develop old, exposed film? A friend of mine just found 3 rolls of exposed 135 (i.e. 35mm) film. They are at least 10 years old. He'd like to know if it is even worth taking them to the local hour photo lab but also if he should give them any special instructions. Find and replace text within a file using commands How can I find and replace specific words in a text file using command line? Why does my object not show up? This is meant to solve this problem once and for all. What is every reason an object isn't showing up in a render or viewport in when using the cycles render engine? I have seen quoted several places on the internet a rule that one can apply bonuses and penalties in the most beneficial order.  An example I come across frequently (as a druid) is the combination of Natural Bond and . Natural Bond increases your effective druid level for determining the stats of animal companions but cannot increase it beyond your character level. Choosing an alternative animal companion lowers your effective druid level for determining the same stats. The "most beneficial order" rule is used to justify applying the level penalty before the natural bond bonus in order to get around the character level cap on natural bond.  Does this rule actually exist? If so, where does this rule originate? I would like to be able to cite a reliable source for my GM. How would I remove the border from an iframe embedded in my web app? An example of the iframe is:  &lt;iframe src="myURL" width="300" height="300"&gt;Browser not compatible.&lt;/iframe&gt;   I would like the transition from the content on my page to the contents of the iframe to be seamless, assuming the background colors are consistent. The target browser is IE6 only and unfortunately solutions for others will not help. View my questions with unaccepted answers There is this new acceptance rate feature that appears beneath my signature card when I ask a question.  How do I display all my questions with unaccepted answers? How can I easily see the list of questions that have not been checked as accepted? A   B   C   D   E   F             I don't even know. It just seemed weird.  Yes, I understand I could just avoid doing something like that. But the problem already exists with a single level.   Consider having 2 images in a post. Both exceed the maximum width of a post. One is nested in a list. Key to this issue is that my original images were much larger. They were automatically resized.  Image    List      I think it looks weird. How to extend WIFI from ethernet Xcode 6.1 won't let me create a new project I'm running Xcode 6.1 on OS X Yosemite and I'm unable to create a new project, as you can see below it just says 'loading'.  I've removed the product and org name for the purpose of this image. I have tried uninstalling but that didn't work. I am new to Xcode and coding in general so I would appreciate it if any solution could be given in lay terms. How to listen my local FM stations in my iphone 4? Like I can listen with my old Nokia phone, without using Internet, GPRS etc.  Is iPhone 4 lacking this facility?  I heard about "Pandora Radio" but it uses the Internet to run and it's also not for Indian FM channels.  In my Nokia Express Music Mobile I can listen my local FM stations without any GPRS, Internet in mobile. I have been trying to install a fresh copy of Ubuntu 14.04 (64 bit version) on my desktop PC from a USB memory stick, but I'm experiencing a problem.  Each time I attempt an install I received an  "[Errno 5] Input/output error", followed by the following message before the installer exits:  "The installer encountered an error copying files to the hard disk: [Errno 5] Input/output error This is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower speed, to clean the CD/DVD drive lens (cleaning kits are often available from electronics suppliers), to check whether the hard disk is old and in need of replacement, or to move the system to a cooler environment."  In order to attempt to remedy this I have so far tried installing Ubuntu to two different hard disks, one of which is brand new, and each time I have received the same error "Errno 5" message. I have also tried installing from 3 different USB sticks using torrent and Ubuntu site iso images burned using both Unetbootin and Startup Disk Creator.  Again, these measures have proved fruitless.  The installation process varies depending of the iso I use, with the Ubuntu download page iso exiting at an earlier stage compared to the torrented iso.  The later torrent iso returns an error and exits when I am prompted for my name, computer's ID and password.  I've never experienced anything like this when installing previous versions of Ubuntu.  I'm absolutely stumped!  Does anyone have any more ideas? What makes a spell being cast considered to be a {class} spell? My understanding is that when a spell is known or prepared via one of your class features, or if you cast it via a class feature, it's considered a "class spell" (sorcerer spell, cleric spell, etc.) for you. If you cast it via some method outside your class (items, etc.), it isn't considered a spell from your class.  For clarity, some class features care about whether or not a spell is a 'class' spell (emphasis mine):    Wild Magic Surge for Wild Magic sorcerers can only trigger "[...] immediately after you cast a sorcerer spell [...]". Overchannel for School of Evocation wizards can only be used "when you cast a wizard spell [...]" Empowered Evocation for School of Evocation wizards can also only be used on "[...] any wizard evocation spell you cast". Rod of the pact keeper gives a bonus "[...] to the saving throw DCs of your warlock spells".   Contrast with a feature like Blessed Healer for Life Domain clerics that just use the language of "When you cast a spell [...]", and you'll see why I believe there's an important distinction as to whether or not a spell instance is a 'class' spell.  However, comments on  made me question where my understanding of what makes a spell instance a 'class' spell comes from, and I'm not sure of a concise spot that explains it. What are the rules that govern what is or is not considered a class spell when cast?   Of particular concern is whether or not a spell is, in all instances, a class spell once you've obtained it from your class. For example, if you were a wizard that had magic missile both prepared and in your spellbook, would any instance of magic missile you cast be considered a wizard spell, even if it was cast by way of, say, a wand of magic missile?