Questions tagged [etc]

Questions about files beneath `/etc`: How to handle them, how they are important, how to make backups, how to find important information.

Filter by
Sorted by
Tagged with
4 votes
1 answer
987 views

sudo: /etc/sudo.conf is group writable

I've made a mistake. List of commands that I typed: sudo usermod -a -G root erp sudo chmod g+w /etc setfacl -R -m u:erp:rwx /etc Then ssh.service of the virtual machine stopped working and when I ...
17 votes
1 answer
8k views

How can I restore /etc/profile?

I'm working on a bash script that appends to /etc/profile, but instead of appending, I accidentally wrote over it, losing all of its content. How can I restore the file? Is there a system default ...
0 votes
1 answer
255 views

How to make permanent changes to /etc/sudoers

I'm trying to setup a Jenkins job that need to run an executable file under sudo I do sudo nano /etc/sudoers add jenkins ALL=(ALL) NOPASSWD:ALL at the end of file CTRL + X and confirm file save ...
0 votes
2 answers
1k views

/etc/sudoers is world writable in linux ssh

I tried everything but nothing works. sudo is not working because it says: /etc/sudoers is world writable Can't login as the root user even if I typed the command sudo -i chmod: changing permissions ...
0 votes
0 answers
30 views

./etc/opt/OS is taking the 49GB of my space while it's not a dir

du -cha --max-depth=1 /etc/opt/OS | grep -E "M|G" 49G /etc/opt/OS 49G total root:/etc/opt# cd /etc/opt/OS bash: cd: /etc/opt/OS: Not a directory root:/etc/opt# dir OS what is the ...
0 votes
0 answers
135 views

There is something wrong with this file in dispatcher.d? My wireless connections are insanely instable

# strings 01-ifupdown: #!/bin/sh -e # Script to dispatch NetworkManager events # Runs ifupdown scripts when NetworkManager fiddles with interfaces. # See NetworkManager(8) for further documentation of ...
5 votes
3 answers
1k views

Number pair prefix to config files

I have noticed some config files having a prefix. E.g. Inside my /etc/php5/cli/conf.d: 05-opcache.ini 10-pdo.ini 20-curl.ini ... Could someone explain this? I am thinking something along the lines ...
0 votes
0 answers
188 views

/etc files security/hardening (sudo)

On Ubuntu 22.04, is that possible to deny ALL /etc files modifications and grant ONLY specific file(s) running as sudo? ex: sudo text-mode-editor-filtered-path /etc/hostname If /etc/hostname absolute ...
13 votes
1 answer
29k views

What are the default settings for '/etc/hosts' and '/etc/hostname'?

I'm using Ubuntu 16.04. I recently started learning DevOps and got a bit crazy with my /etc/hosts and /etc/hostname files. In my frantic attempt to spin up a couple of servers from my local machine I ...
1 vote
2 answers
631 views

bilibop-lockfs is disabled

when starting my machine I got this message: bilibop-lockfs is disabled How to enable it ?
0 votes
0 answers
523 views

/etc setting to ping as non-root freely

Since some not long time ping stopped working as non-root (I'm not sure if it distro-wide or maybe it is my custom kernel). The ping is fixed by this command: sysctl -w net.ipv4.ping_group_range="...
0 votes
1 answer
677 views

set virtual memory limit permanently

I need to keep my remote machine from swapping (will not respond to ssh anymore). Therefore I set ulimit -Sv 300000; ulimit -Hv 300000. It is laborious to do this manually, so I want to set it ...
1 vote
0 answers
67 views

Move from booted RAID to single drive

Have Ubuntu 22.04 server installed on RAID5. It boots from /. I'd like to move it to a new SSD single drive though. My thoughts to do this is: Make a backup of / with some software on backup ...
0 votes
1 answer
1k views

Reset the printing system

To debug some printing problems (printing through the usual printing dialog), I would like to reset the printing system to its initial state, cleanly removing all automatically and "manually"...
0 votes
1 answer
5k views

Ubuntu 22.04 - error in /etc/apt/sources.list [duplicate]

After upgrading from 20.04 LTS to 22.04 There seems to be something wrong with my etc/apt/sources. When doing the sudo apt-get update I get a whole list of errors. I have googled but I have not found ...
0 votes
1 answer
298 views

deleted /etc/environment file by accident

I deleted the /etc/environment file by accident. Is it important? What does it do? How can I recover it? I saw another post saying most of the time the file has the same generic line: PATH="/usr/...
1 vote
2 answers
5k views

How to revert damage done by editing /etc/os-release

currently running Ubuntu 20.04.1 LTS. I changed the /etc/os-release file to match that of an older version to fool a program I was trying to install. While the file was changed Ubuntu installed some ...
0 votes
0 answers
258 views

Ubuntu 20.04 often freezes before login. Error with /etc/profile

I am quite new to Ubuntu. For a month, my system has frozen 2 out of every 3 times when it reached the login screen. Dual boot with GRUB was fine. Keyboard was responsive and I could switch between ...
-1 votes
1 answer
62 views

Error in etc/sudoers.d/Nikhil Kumar Singh

When I enter sudo -s or any sudo command I am getting an error like this etc/sudoers.d/Nikhil Kumar Singh syntax error near line 1... I have tried multiple things but nothing has resolved the issue......
0 votes
0 answers
130 views

issued certificated has expired

I have download the code from GitHub and tried to build the project, but receive the following error: issued certificate expired The same project already exists on the system and no error is thrown. ...
1 vote
1 answer
1k views

ubuntu 14.04 won't boot: run-init: /etc/init: Permission denied

I think something I installed caused this. When I try booting this is what happens: run-init: /sbin/init: No such file or directory Target filesystem doesn't have requested /sbin/init. run-init: /etc/...
28 votes
3 answers
65k views

what is difference between /etc/shadow and /etc/passwd

Both files /etc/shadow and /etc/passwd seem to be the same, they just report some information about accounts. What is the difference between them?
1 vote
0 answers
779 views

"/etc" directory is missing or corrupted in Ubuntu 20.04 LTS

Hello fellows Ubuntu users ! I hope this is not a duplicate but I need help on my computer. Since I switched from Kubuntu to Ubuntu (both 20.04 LTS), I keep having issues with this computer. I thought ...
1 vote
0 answers
3k views

I edited /etc/sudoers and now I cannot use sudo anymore [duplicate]

I made the following change in the file /etc/sudoers: sudo ALL=(ALL) NOPASSWD:ALL And now I can't use sudo and can't edit /etc/sudoers anymore: /etc/sudoers: near line syntax error 31 <<< ...
0 votes
1 answer
904 views

Simple /etc/rc3.d startup script is not invoked?

I'm running Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64) simple install from DigitalOcean and have installed packages, etc. Notice this startup test script: bryan@db:~$ ls -lh /etc/rc3.d/...
1 vote
0 answers
141 views

Why shutdown button only works when HDMI monitor is connected

It sounds weird, but I configured my Ubuntu 18.04-4 LTS to shutdown immediately when I press the power button but it works fine ONLY when the HDMI monitor is connected. If I disconnect the monitor (I ...
20 votes
3 answers
39k views

Should one use FQDN in /etc/hostname instead of hostname?

As I read in man page, it is recommended to put hostname(without domain name) to /etc/hostname. For example, host instead of host.domainsub.domaintld. But, as I know, some software relies on having ...
0 votes
0 answers
840 views

How can I get a list of files that I modified/added in /etc and other paths outside of the home folder?

Over the years, I've been making tweaks to my Ubuntu system, such as adding files to /etc, to customize it. I now want to do a fresh re-installation of Ubuntu, and I want to capture all of these ...
1 vote
0 answers
98 views

not able to sync from server to server to /etc/letsencrypt location

I am making a cron job on my server node that uses haproxy base concated cert file from letsencrypt. however when I am at home I have same dns pointing to the home server which is actually hosting the ...
0 votes
1 answer
572 views

Can't access my VPS through SSH

I just misconfigured my /etc/passwd had used this command on root login root@ubuntu:~# sh -c 'echo "nope no entry mates" > /etc/passwd' Now whenever I try to access my VPS though any ...
0 votes
1 answer
3k views

Where is the apache2 directory on Ubuntu 20.04?

In order to activate the Basic Auth I installed apache2-utils: sudo apt-get update -y sudo apt-get install -y apache2-utils but I can't find the /etc/apache2 directory. I uninstalled and reinstalled ...
0 votes
2 answers
17k views

cannot find /etc/proxychains.conf after installing proxychains

I downloaded proxychains on ubuntu 20.04 recently using sudo apt install proxychains Now for configuring the proxy addresses, I cannot find the /etc/proxychains.conf file. What to do now? Any ...
-4 votes
1 answer
2k views

Display the username and passwords fetched from etc/passwd and etc/shadow files in a single file using cut and paste commands [closed]

i want username and password fetched from etc/passwd and etc/shadow files in a single file using cut and paste commands
0 votes
1 answer
165 views

no lpr or lprng file in /etc/int.d/

My printer is behaving randomly except for the test page. It always works well on test page. Sometimes it works well on all applications. Sometimes it works on Chrome, chromium, but not on Firefox and ...
0 votes
1 answer
677 views

This configuration file is essential to DNS resolution?

# /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service ...
1 vote
1 answer
14k views

How to permanently save the content of /etc/resolv.conf

As I mentioned in the title, ctrl+s doesn't permanently save the content of that file, if I rebooted my machine I lost all the configuration I did in there, an help, please.
0 votes
2 answers
450 views

Why did adding read permissions recursively to /etc break ssh?

For reasons I am too embarrassed to share, I ran this command as root on a remote server: chmod a+r -R /etc Once I logged out of the SSH session, I was not able to SSH back in: $ ssh myusername@<...
14 votes
2 answers
14k views

How to run a script when suspending/resuming? - Sony VAIO Ubuntu 12.04

Question: How to assign a script to run when selecting the suspend option on the power menu? Context: I have a Sony VAIO laptop with an AMD Radeon graphics card. I would like to be able to disable/...
153 votes
9 answers
383k views

After modifying /etc/hosts which service needs to be restarted?

After modifying /etc/hosts, which service(s) need(s) to be restarted for the change to take effect?
0 votes
0 answers
452 views

/etc/profile not sourced on ubuntu 20.10

I am a newbie on ubuntu. I have used CentOS for several years but change to Ubuntu. I install ubuntu 20.10 desktop on virtual machine and oracle jdk and anaconda 2020-12 on it. And I set JAVA_HOME and ...
1 vote
0 answers
165 views

Why does default-string appear after hostname in etc/hosts?

Referencing: This question The author is asking how to change hostname when it includes the appendage ´default-string´, If root is required to change the file in the path etc/hosts should this be ...
0 votes
2 answers
1k views

How can I get an exact copy of Ubuntu's default /etc/crontab file from any official (local or remote) repository? [duplicate]

Long story short: I accidentally deleted the default content that the 64-bit Ubuntu 20.04 installer had put inside of /etc/crontab during Ubuntu's installation on my computer, so now I'm trying to ...
1 vote
2 answers
3k views

Error found while loading /etc/profile: /etc/profile.d/01-locale-fix.sh: line 2: /usr/bin/locale-check: No such file or directory

I'm a newbie, 3 months into Ubuntu, running 20.04 from 18.04 and 19.10.
0 votes
0 answers
813 views

Why my messages in /etc/motd are not showing?

My welcome message is not showing, how do I check if it is enabled or disabled
0 votes
0 answers
131 views

E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/winehq.list E: The list of sources could not be read [duplicate]

line 1 does not contain anything I have checked this by using sudo gedit /etc/apt/sources.list command. Got this error during repository update.
0 votes
1 answer
136 views

problems with my /etc/profile

I am a rookie in ubuntu, I tried to install java but I think it was installed yet (I didn't check it before, sorry), now an error pops up appears in my screen every time I log in /etc/profile: line 28:...
2 votes
2 answers
1k views

Why is there /etc and ~/.config? Why is the global config called "etc" yet the user's config stuff is called ".config"?

Why is there /etc and ~/.config? Why is the global config called "etc" yet the user's config stuff is called ".config"?
2 votes
1 answer
194 views

How to configure two Epson scanners on my PC (18.04)

I want to configure a second epson scanner device on my PC. Does anybody know the format of required lines in imagescan.conf (epson scanner interface configuration - V3)? My first scanner, a Epson ...
0 votes
1 answer
229 views

Meaning of words in /etc/login.defs

Community! After printing /etc/login.defs, I've encountered such magic numbers like #290803 and #298773. I guess they refer some documentation about security risks, but where I can find it? Fragment: #...
2 votes
1 answer
311 views

I am unable to close octave [duplicate]

I had a problem with installing Octave. Now I am unable to close it once it is opened. And I am unable to shutdown the computer. What path should I set, what /etc/environment should I set? I had used ...