I am new to Linux and on of my projects is to find all .config files. I made sure to be logged in as root. What command would I run to do this.
124031
I want to search for all files with the .sql extension in folders and sub-folders (recursive).  How can I do this?
105
I can't seem to edit and save config files in the root system (eg: /etc/dhcp/dhcpd.config); it just says "permission denied" or the save option is blocked in the text editor.  I'm pretty sure I'm a root user, but how do I make sure? If I am a root user, how do I fix this?
63641
To create persistent environment variables, I add the script file to /etc/profile.d directory, for example:   # my script export MY_VAR=var_value   This works properly for current user:   alex@alex-64:~$ echo $MY_VAR var_value   Now I need the same environment variables for the root user, but /etc/profile.d script doesn't work for root:   alex@alex-64:~$ echo $MY_VAR var_value alex@alex-64:~$ sudo su root@alex-64:/home/alex# echo $MY_VAR  root@alex-64:/home/alex#    How can I set the same variables for the root?
16810
I would like the user to have full rights on this folder (as well as all sub-directories and files in it):  ~/.blabla   currently owned by root.  I have found numerous posts (in this forum and elsewhere) on how to do this for files but I can't find a way to do it for whole folders.
87944
I am using:  user@unknown:~$ sudo command -option &gt; log   to save the results of "command" to the file "log", but I'd like to also get the result on the terminal, is this possible?  I am using ubuntu 10.04 lts.
34963
It is company policy for admins to login to the servers via a personal username, and then run sudo -i to become root.  Upon running sudo -i, sudo will create an environmental variable called SUDO_USER, which contains the original user's username.  Is there a way to log ALL commands within syslog with something akin to the following syntax:  ${TIME/DATE STAMP}: [${REAL_USER}|${SUDO_USER}]: ${CMD}   An example entry would be:  Sat Jan 19 22:28:46 CST 2013: [root|ksoviero]: yum install random-pkg   Obviously it doesn't have to be exactly the above syntax, it just has to include a minimum of the real user (eg. root), the sudo user (eg. ksoviero), and the full command that was run (eg. yum install random-pkg).  I've already tried snoopy, but it did not include the SUDO_USER variable.
94968
For some reason, when I try to run any programs (I am trying to run a rootkit hunter: rkhunter) as root on the command line with sudo like this:  sudo rkhunter   Then I get this message:  You must be the root user to run this program   and then I get these lines:  sudo: error in /etc/sudo.conf, line 0 while loading plugin 'sudoers_policy' sudo: /usr/lib/sudo/sudoers.so must only be writable by owner sudo: fatal error, unable to load plugins   I try typing in just sudo but that comes up with the same three errors as above. Also in /etc/ sudo.conf does not exist.  I cannot run any other programs as root through sudo. It was also strange because I could run as root a day ago. I would like it to work.  Just so you know, I am the only user of this computer, and the administrator, running Lubuntu 14.04.1.
2104
I've often come across posts on forums or other websites where you see people joking in such a manner about running/logging in as root as if it's something awful and everyone ought to know about it. However, there isn't much that a search reveals on the matter.   It may be widely known to Linux experts, but I really don't know why. I remember always running as root when I first tried Linux years ago (Redhat and Mandrake) and don't remember running into any problems because of that.   There are actually some distros that have a bright red background with alert signs all over it as wallpaper for the root user (SuSe?). I still use the "Administrator" account for regular use on my Windows installation and haven't ever run into any problems there either.
76494
I was setting path for anaconda. an answer to a question  has the following solution. I searched for .bash_profile, but I can't seem to find it. How do I setup this file and get it to run on startup?
67375
I can no longer log in to my system after running this command :  sudo chown -R &amp;USER: $HOME   as ROOT because I couldn't access  a certain file.   Now I can't log in again.
64555
The return value of command who will always include root :0 in X Window pts. I guess it actually means the GNOME login. Am I right?  Another question is where to get this knowledge, as I don't see it in the man who, neither in info who.  Example  [root@localhost root]# who root     :0           Sep 11 06:33  root     pts/0        Sep 11 06:36     (:0.0)
10542
Is ~/.bashrc  the only place to specify user specific environment variables, aliases, modifications to PATH variable, etc?  I ask because it seems that ~/.bashrc seems to be bash-only, but other shells exist too…
79533
The bash command last (needs sudo) prints out logs, which contain information on when different users log in/out of the shell.  I have been looking for the file that stores this information, that last would access. I have checked /var/log/system.log and other files within /var/log.  I have looked everywhere on the internet as well, and cannot find the location.  I have, however, confirmed that the file is within /var/log, because when I did rm -rf /var/log/, sudo last showed empty output until the next time I logged in.  Which file is it? Thanks.  (I am using OS X Mavericks if it makes a difference.)
49065
When I run sudo, what exactly happens to my environment?  When I run sudo command, it doesn't seem to see my or root's environment. For example, my path for both includes /usr/local/bin, but if I try to run one of the program's without the full path, it fails.  I thought sudo ran as root, and hence got root`s environment. Is there a different way that bash executes under sudo than under root or my normal user?  EDIT:  I have been using sudo -i lately, but recently it has been causing problems because my current working directory gets set to /root. This is as expected (sorta), but I still don't understand why sudo isn't recognizing my executables in /usr/local/bin.  EDIT:  I am running Fedora 15.
114118
I have a severe problem today: when I type ifconfig it does not show ip configuration on ubuntu 12.04. Can anyone help me on this?  Here is the result of ifconfig:  Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative privileges associated with your user account. ifconfig: command not found
26615
I needed to edit a .config file (which I know for a fact is not creating these problems, just to clear that up) and it wouldn't let me save it, so I took ownership of /etc and all contents with the command chown -hR username /etc and that let me edit the .config file but now whenever I try to install any packages or use any sudo commands, it doesn't work  (I've checked for errors in the sudo file in sudoers.d and there was nothing wrong with that).   So how do I return it to the previous owner?
93918
I love Linux and everything she stands for; however, unfortunately I grew up with Windows. Thusly so I have learned very bad practices (such as NT Authority will protect me). I have several Linux VPS's for personal and educational uses and I manage all of them from the command line. Through the management of these servers I have learned very painful lessons of the power of the Root user. Such as:   rm -d -R /* chown www-user:www-user -R /* Etc.    I've only removed my root directory twice, but just last week I changed the permission of the whole drive - effectively locking the Root out.   Now I know that I should never be logged in as Root, but most of the time I have to deal with files that only the Root owns so I sudo and run the command.   So my question is, is there a way to prompt the user (who is root, or sudo'ed) when a potentially hazardous command is executed, so the user may rethink their decision? Possibly through scripts in Bash, or a different sudo wrapper.   Or (I ask this hopefully, and very simplified) is there a way to set up permissions where instead of a two tier user system (Root user, regular user) there is a three tier system like in Windows (NT Authority, Administrator, other User). Basically is there a way to keep the ability of System administration, but restrict access to some system files.