I regularly need to drop a postres database and recreate it. It has to be done as postgres user as following:  $ sudo -u postres dropdb my_database    I thought of adding sudoers rules for not being asked a password. Usually I proceed by creating a file in /etc/sudoers.d/ with a rule like this one:  Cmnd_Alias DROP_DB = /bin/bash -l -c dropdb*, /usr/bin/dropdb* emilio ALL = NOPASSWD: DROP_DB   But in this use case, I need to run the command as postgres user and it doesn't work.  What is the proper way to run a command as a different user without being asked a password?  EDIT: This might be a duplicate but it brings a different solution using visudo which is interesting.
I would like to run a script from the main ubuntu shell as a different user that has no password.  I have full sudo privileges, so I tried this:  sudo su -c "Your command right here" -s /bin/sh otheruser   Then I have to enter my password, but I am not sure if that script is now really running under that user.  How can I confirm that the script is really running under that user now?
strip last comma from get_the_category I am designing the layout for a touchscreen for outside use, What are some good color combination to use that will be visible under the sun light for outside use? Maybe bright neon colors? I am in the process of creating a LaTeX template for a conference submission, and up until now I've been working only with the anonymous submissions. Now I need to create the "camera-ready" version, which means I need to add authors to the document.   The template is based on article.cls, with some tweaks to meet the font and formatting specifications. The following image contains the examples from the Word template for the conference:    Basically, I need to be able to bold the author's name (which could I suppose be done manually in the document rather than in the template) and more importantly: divide the authors into two columns, with an optional centered last column with an odd number of authors. The font size of the author block corresponds to my \LARGE defined in the class file.  Are there any packages that facilitate this type of conditional formatting, either in a document, or in a .cls file? How can I use those packages to achieve the formatting I require? Where is attribute table in ArcGIS Desktop when not visible? I've just updated to ArcGIS 10.1 for Desktop and when I go to open an attribute table, I can not see it anywhere.   I'm wondering if it is off my screen somewhere or if its just super tiny that I can't see it.   I'm using dual monitors and it's not popping up on either.  Is there a way I can find my attribute table? How to use ssh to transfer files from computer a to local computer I am trying to get some files off of my school Linux account using ssh. I have got the connection to work using:  scp &lt;school_server&gt;: ~/folder I want ~/where I want to go.    But when it goes to transfer folder it gives me the message:  not a regular file    The file contains .java files, and I want the whole folder. Is my Geoserver "Direct WMS Integration" working? I have a WordPress website that I recently discovered had this error on the login page:     ERROR: Cookies are blocked due to unexpected output. For help, please   see this documentation or try the support forums.   I can only access the login page from wp-login.php, since /wp-admin/ displays a blank white page.  I've searched the web and tried many things with no success:   Removing ?&gt; and space at end of the functions.php Ensuring both functions.php and wp-config.php had no spaces at beginning or end of file Opening wp-config.php and functions.php in Notepad++ and converting to UTF-8 (people recommend 'without BOM' but that is only an option in the newest version of Notepad++ - I'm guessing UTF-8 does that now) I've set WP_DEBUG to true and have received no errors in debug.log,  except for 2 that relate to when I hadn't fully uploaded some files. That particular error mentioned nav-menu.php; this confirmed that it is reporting errors, just not related to my login issues I renamed each plugin folder with _tmp at the end to try and rule out any plugins causing the problem I also renamed the plugins folder to rule out all plugins at the same time   Given these things I've tried, and that I'm not receiving any PHP errors, what else could I try? Science fiction story where a colonist is sent by a company to colonize a planet and there a robot tries to sell him a depilating liquid by pulling a gun on him. The company who sponsored his trip to the new planet is extorting him by charging him exorbitant rates for anything they declare is not considered by them as bare necessities. The robot and man collaborate to get from the company the fair deal he deserves. How to pass arguments to addEventListener listener function? The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable. SQL Server Linked Server to Microsoft Access Proving the Cauchy-Schwarz inequality by induction Share question to Social Media option or button is much needed How do I install Ubuntu Server (step-by-step)? I'd like to install Ubuntu server on my machine, is there a step-by-step instructions on how to accomplish that or a guide that will just go through the basic steps of installing Ubuntu Server from beginning to end.  Instructions originally for 13.04. As far as I understand, one of the main claimed problems with initializing e.g. a feed-forward neural network (with several $\text{tanh}$ or $\text{ReLU}$ layers) with $W=0$ is that it doesn't break "network symmetry", meaning, backpropagation would propagate the same error through all such units (i.e. "nudging all weights in the same direction"). This is, I presume, undesirable because we would not be learning "different" calculations through different paths of the network.  However, I'm confused why that even matters in this case given the fact that if $W$ ever drops to 0, we will effectively be propagating no gradients at all through the network, since W=0 would multiply all errors from the output and prevent any learning.  Put another way, even if $W=0$ does not break network symmetry (wasting calculations and paths in the network) is it correct to say that if $W=0$ (e.g. by initialization) we are effectively killing gradients in a neural network, and thus no learning can take place? Javascript infamous Loop issue? divisor of a product of integers is a product of divisors I read this recently on the web and can't manage to understand it. Not homework -- I haven't done math homework for years.  If $d\mid ab$ then $d=d_1 d_2$, that $d_1|a$, that $d_2|b$ and, further, if $(a,b)=1$ then $(d_1,d_2)=1$.  I know it's the same question... if $a = a_1 a_2 ... a_n$, why can't $d$ divide some $a_i$ and only $a_i$? How to truncate all logfiles? App Store asks for old Apple ID when installing updates I got a MacBook that a colleague of mine had used previously. It runs OS X 10.10.2. I created a new administrator account for myself and turned off the "admin" flag on the old account.  I also entered my iCloud / Apple ID account, so that it syncs my calendars and contacts correctly, and even in the App Store, I am signed in with my correct account.  But when I try to install pending software updates (that is, OS X system updates!), the window that pops up has the the e-mail address of my colleague filled in and greyed out—and I can't change it.     Note that I'm signed in with a different (correct) account in the App Store. When I go to Featured and click Account on the right, it has my correct e-mail address filled in:    How do I make the App Store "forget" the old Apple ID?  I  where it just says "it's not possible", and that apps are glued to the original account the Mac was set up with, but that doesn't make a lot of sense, especially in a company where laptops may be handed over from one person to another. Error message "sudo: unable to resolve host (none)" When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this:  ubuntu@(none):~$ sudo true sudo: unable to resolve host (none)   What can I do to solve it? How to handle :java.util.concurrent.TimeoutException: android.os.BinderProxy.finalize() timed out after 10 seconds errors?