I'm trying to add pkill to my sudoers file, but I think I need the full path for it to not give a syntax error. Does anybody know how to find it?
1248
When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead?
114516
This question led to a new package:      How can I display the full path of the tex file that I compile? It is a simple file, no include or input present.  Edit: I use MiKTeX 2.9 on a Windows 7 64-bit.  Less demanding: If not possible, then I will be satisfied with a partial path (at least one or two folders up + the filename).
76256
I get error message always when I work with sudo command.  It shows always sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700.   A while ago I changed the permission of /var folder to 777.   How can I fix it?
28727
There's a GUI in Windows to edit the path variable. I was wondering if there's something equivalent in Ubuntu to do the same.
1809
In /etc/sudoers I see this:  # Allow members of group sudo to execute any command after they have # provided their password # (Note that later entries override this, so you might need to move # it further down) %sudo ALL=(ALL) ALL   So how do I add a user to that sudo group?
72754
Is this a correct way for passing an environment variable in sudo ?  sudo -u www-data -b env FOOBAR="foobar" /home/user/folder/daemon
120288
I'm a systems admin for a company and was thrown into a horribly configured server. In the midst of my refactoring I was adding users to my /etc/sudoers file. I seem to have accidentally removed my server admin account from the sudoers file access.  I know what I did wrong (i accidentally commented out the %admin line) question being, how can I reinstate my server admin access in the file without having to restart anything.   Here's how it looks right now:  ## ## User privilege specification ## root ALL=(ALL) ALL #%admin  ALL=(ALL) ALL %superuser ALL=(ALL) ALL "user1" ALL=(ALL) ALL "user2" ALL=(ALL) ALL   Also note that my users do not have permission for sudo for some reason:  Realtor-Station-3-27:~ user1$ sudo -i  WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo. Type "man sudo" for more information.  To proceed, enter your password, or type Ctrl-C to abort.  Password: user1 is not in the sudoers file.  This incident will be reported. Realtor-Station-3-27:~ user1$
4984
Sometimes the output of ps -p $$ shows the absolute path to the currently-running zsh,  % ps -p $$   PID TTY           TIME CMD  1027 ttys005    0:00.11 /usr/local/bin/zsh   but not always:  % ps -p $$   PID TTY           TIME CMD  1507 ttys003    0:00.07 zsh -fl   What is a consistent way to get the path to the currently-running zsh?  EDIT (clarification): I'm interested in how to do this primarily in Darwin and Linux, but also in NetBSD.
77744
This error occurs whenever I try to work with sudo. I changed the permissions of /var/ folder to 777 and I think this causes the error. Please help me get back a functional sudo and /var.
23068
I need to run something as sudo without a password, so I used visudo and added this to my sudoers file:  MYUSERNAME ALL = NOPASSWD: /path/to/my/program   Then I tried it out:  $ sudo /path/to/my/program [sudo] password for MYUSERNAME:    Why does it ask for a password? How can I run/use commands as root with a non-root user, without asking for a password?
96718
I'd like a way to add things to $PATH, system-wide or for an individual user, without potentially adding the same path multiple times.  One reason to want to do this is so that additions can be made in .bashrc, which does not require a login, and is also more useful on systems which use (e.g.) lightdm, which never calls .profile.  I am aware of questions dealing with  from $PATH, but I do not want to remove duplicates.  I would like a way to add paths only if they are not already present.
75569
Say I do the following:  cd /some/path ln -s /target/path symbolic_name   If then do:  cd /some/path cd symbolic_name pwd   I get:  /some/path/symblic_name   and not:  /target/path   Is there a way to have the shell "fully resolve" a symbolic link (i.e. updating CWD, etc.), as if I had directly done:  cd /target/path   ?  I need to run some programs that seem to be "aware" or "sensitive" about how I get to my target path, and I would like them to think that I arrived to the target path as if had done cd /target/path directly.
50998
Accidentally removed my gnome desktop and am stuck in tty1. Trying to reinstall the desktop and keep getting the error "user is not in the sudoers file". Having trouble adding my user, new to debian and am not sure how to correctly open/edit sudoers from tty1 (or really how to edit files from cmd line for that matter if someone could please lend some specifics)!
59475
I am getting this error:  sudo: parse error in /etc/sudoers near line 23 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   I was trying to disable password authentication so I don't have to type password every time I want to install something, but I probably changed it in a not very good way. I am a newbie to Ubuntu, I got sick of Windows :)  So far I've found some people suggesting booting in single user mode, but I'm afraid of messing things up more.  How can I fix this error?
6139
What is the default password of the sudo? I visit some forums, it tells that the default password is password, but it doesn't work, how can I determine the password?
95118
The windows command line prompt display the full path of the currently directory, which will be too long when I am deep into a directory, like:  V:\Runtimes\ProjectName\src\ToolsTest\JavaCrashExample\JavaCrash\main\ToolsTest\JavaCrashExample\JavaCrash&gt;   Is their any way to customized this, so that I can just display the current directory's name?  Thanks.
27663
I just ran this a few seconds ago. I managed to do Ctrl - C as soon as I realized what I started doing.  So far the only directory it's started going through is /bin.  I'm afraid to do anything else. So far I realized I can't use su as my normal user anymore.  Luckily I still have another root terminal open. What do I do?