Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [etc]

/etc is the directory that holds the essential system and software configuration. Use this tag for questions on the organization of /etc or the syntax of configuration files within /etc. Don't use this tag for questions on the configuration of particular software.

1
vote
1answer
44 views

Source of /etc/protocols and /etc/services?

Those files are databases which contain IP protocol number, alias and service mappings. As a user I don't usually interact with those in any direct way, but the need to create special Linux/GNU ...
-3
votes
3answers
47 views

How to display only names of the file [closed]

How to display only the names of the last 10 services listed in /etc/services?
0
votes
0answers
20 views

By enabling automatic security updates on CentOS/RHEL 7 how can I control the rest?

If I enable automatic security updates via "update_cmd = security" in "/etc/yum/yum-cron.conf" how am I able to control the "default" behavior of the other packages?
1
vote
0answers
36 views

A more permanent change to readonly squashfs mounted /etc

I have an IP-camera with the BusyBox v1.22.1 operating system that has some accounts either without or with public known passwords that I want to change to make it more secure. I have managed to log ...
1
vote
1answer
58 views

OpenBSD: Check what files under /etc has changed in comparison to pristine base system

I'm planning on setting up a new personal OpenBSD-current system by means of installing the latest OpenBSD snapshot, and I would want it to look more or less similar to my existing OpenBSD-current ...
0
votes
1answer
78 views

What is the difference between using crontab -e and /etc/crontab [duplicate]

I wish to run stuff from startup and also trigger reboots using cron. I was using sudo crontab -e and adding commands there. The commands work apart from the reboots. The reboots do not happen all ...
1
vote
1answer
140 views

Unable to edit auto_master under macOS Mojave [closed]

I'm running macOS since several years and I have an auto_master file that contains my mounts config. On a new Macbook, I cannot edit this file which is in the /etc folder and I have the following ...
0
votes
1answer
83 views

Why does the primary group of my user show up in /etc/group?

I'm following a course about Linux and it states the following: "The primary group of a user is not mentioned in the /etc/group file." However, my primary user "timgeldof" actually does show up in ...
0
votes
1answer
77 views

MAXWEEKS on Solaris is equals to 13

I have a server where MAXWEEKS is set to 13 in etc/default/passwd. I know that this setting means that password will expire after 13 weeks. My question is if the user does NOT change the password, ...
1
vote
1answer
38 views

Is there any way of resizing /etc directory in linux machine [closed]

I have tried to create a partition name "/etc' at OS installation time and my installation was not working.When I cancel creating "/etc" directory than it worked. Though all configuration files are ...
2
votes
1answer
191 views

Whitespaces in /etc/exports

I've read the following in a website [1]: /etc/exports is very sensitive to whitespace - so the following statements are not the same: /export/dir hostname(rw,no_root_squash) /export/dir ...
0
votes
1answer
177 views

/etc/bashrc overrides my settings in home .bashrc

i have the following code for my prompt in .bashrc in home dir: PS1_TIME='\033[01;31m\]\t \033[01;32m\]' PS1_USERNAME='\[\e[1;36m\]\u\e[1;37m\]@\e[1;32m\]\h\[\033[00m\]' PS1_LOCATION='\[\033[01;34m\]\...
1
vote
0answers
64 views

How to use particular copy of etc/apt/sources.list for downloading particular software [closed]

I want to download package year wise. I have created the 18 copies of /etc/apt/sources.list with url of particular year. like using 2001 in 1st copy..using 2002 URL in second copy..and so on. Now I ...
0
votes
3answers
1k views

How to make name server address permanent in /etc/resolv.conf even after system reboot? [duplicate]

I changed nameserver in /etc/resolv.conf and after a system reboot it resets the nameserver back to what it was. I am using linux mint 19 (Cinnamon). This file is managed by man:systemd-resolved(8). ...
1
vote
1answer
148 views

user resources csh.login restrictions

I need to fix a vulnerability in a RedHat 6 server: File /etc/csh.login must exist, and must trigger an invocation of source /etc/profile.d/IBMsinit.sh. I verified file csh.login is in /etc, but I ...
4
votes
1answer
785 views

How to write an automatically sourced shell script to /etc/profile

I heard through the grapevine that files in /etc/profile will be automatically sourced by bash upon login? I tried writing something simple to /etc/profile: echo "echo 'foo'" > /etc/profile/foo....
0
votes
0answers
101 views

Shall I run a sudo-required script in some shell configuration file?

Is it a good idea to put a sudo command in a shell configuration file? I have a bash script /home/t/bin/changeCpuFreq.sh which can change my cpu frequency. The line 40 in my script is echo $1 > /...
1
vote
2answers
580 views

How to manage /etc/passwd file

Let's say I want to keep the /etc/passwd file divided into system users like admin, wheel, root etc., and by actual users all at the end. How do I do that? By creating subdirectories?
3
votes
1answer
2k views

Are http://cdn-fastly.deb.debian.org/ and deb.debian.org one and the same service?

Sometime back, I had noticed that httpredir.debian.org no longer works or works a bit weirdly. I started using cdn-fastly.debian.org . This is how my /etc/apt/sources.list is setup currently - $ cat ...
-1
votes
1answer
686 views

Account locked after adding line on /etc/passwd file

I have installed this version of Ubuntu on my laptop. └─ $ ▶ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: ...
18
votes
3answers
16k views

What is the purpose of /etc/hosts?

As I understand it, the hosts file is one of several system facilities that assists in addressing network nodes in a computer network. But what should be inside it? When I install Ubuntu by default ...
1
vote
0answers
26 views

AuFS reads and writes from different branches

I'm looking for a way to keep /etc files from a distribution intact, and keep any customizations in a separate partition, using AuFS to lay the customizations over the default files. Is it possible ...
13
votes
6answers
5k views

What is the benefit of /etc/apt/sources.list.d over /etc/apt/sources.list

I know this question has been asked before, but I do not accept the answer, "you can clearly see custom additions". When I add ppa's (which I have not done in years), I hit a key on my keyboard ...
1
vote
1answer
126 views

In Windriver Linux how /etc/resolv.conf file gets generated? [closed]

In Windriver Linux how /etc/resolv.conf file gets generated? Version- 8.0, kernel version 4.1.21 And if in case when I build an image if I package resolv.conf file too will the content of it gets ...
0
votes
0answers
20 views

Hyphen Suffix on file name [duplicate]

I decided to randomly take a look at my /etc directory, and I saw some entries like this: passwd passwd- shadow shadow- subgid subgid- I know they are hyphens (-) and not tildes (~). What are the ...
1
vote
2answers
224 views

Persistent systemd machine-id in a stateless (UBI/UBIFS) embedded linux environment

I have an embedded linux machine which has a read-only root filesystem which is loaded from a UBI/UBIFS. Every time the device boots it creates a new systemd machine-id which I understand from ...
0
votes
1answer
114 views

Where you set path for golang or java in ubuntu?

In some tutorials path is set in ~/.profile however in some other tutorials they use etc/path or ~/.bashrc, can you explain whats the difference and how it works in linux.
0
votes
2answers
713 views

su -s '/bin/bash' continues to use shell in /etc/passwd

I manually edited the shell for root in /etc/passwd and I have a typo. Making it worse, I have no sudo user on the box. So I have tried the following, with the following result: $ su -s '/bin/bash ...
0
votes
1answer
38 views

/etc/group declared seemingly wrongly, still works?

This is more of a clarification question than a problem. I'm not a sysadmin, but out of curiosity I went through our config files and encountered this behavior. This is on a CentOS 5.8 system /etc/...
0
votes
0answers
58 views

Where do CLI tools conventionally store config files?

I'm working on CLI tool written in python. There should be default config directory. Very similar to nginx approach: conf_root |__main.conf |__projects |__project1.conf |...
1
vote
0answers
29 views

Disallow user from entering, listing specific folders

I have a question about, how can I restrict a standard user from entering the /etc folder? My goal is to have a user with bash, who can enter the /var/www/html folder and its own home folder but ...
1
vote
1answer
5k views

Reload settings in /etc/fonts/conf.d

I am tweaking some font settings in Arch Linux. I have created a new .conf file in /etc/fonts/conf.avail/ and symlinked it into /etc/fonts/conf.d. I would now like to test the changes. I have tried ...
0
votes
2answers
518 views

no-mtab option not working for mount

I have a script which tries to mount /dev/loop0 on a mount point, say /mnt/mp on RHEL. The command I use is below. mount /dev/loop0 /mnt/mp --no-mtab -o ro This is not supposed to create any entry ...
1
vote
0answers
34 views

Dual Boot System File Issues with /Etc/ Hosts and Profile

I've done my first dual boot with Windows 10 and Ubuntu 16.04. While I used to have a Linux only set up, my current job needs me to interact with Windows software regularly. So, I've had two ...
1
vote
1answer
110 views

How to populate many config files with same value(s) [closed]

I have many programs and all of them have some identical values in their config files (most, if not all, of which are in /etc). Let's say it is hostname, which is stored in the config files of Apache,...
0
votes
1answer
81 views

javac installed in /etc

I have installed openjdk-9-jdk:amd64 on Ubuntu and when I run which javac it shows me a softlink leading to the /etc directory: $ ls -l /usr/bin/javac lrwxrwxrwx 1 root root 23 kwi 13 08:09 /usr/bin/...
8
votes
2answers
535 views

How to get copies of default Linux etc files

Only sometimes, I forget to make a backup of a given linux file such as /etc/rc.local, /etc/rsyslog.conf, /etc/dhcpcd.conf, etc, and later wish I did. Distribution agnostic, is there a good approach ...
3
votes
2answers
81 views

How could you possibly preserve file ownership in a backup (/etc)?

I've seen a number of sources suggest it can be useful to back up /etc. E.g. the presentation "Supporting Debian machines for friends and family". For any serious backup, we also need a well-defined ...
3
votes
1answer
51 views

How can I preconfigure a wireless network I haven't seen yet?

I'm setting up a Raspberry Pi running Raspbian with some specialized software and with the intent to ship it out to a customer and just have them plug it in and work. However, since the customer is in ...
7
votes
5answers
2k views

if statement query user id in etc/passwd?

Using bash I am trying to query /etc/passwd for any users with an id over 1000. If they exist do something, else do something else. I'm stumped. Any help is appreciated. if [ "$(id -u)" -gt "1000" &...
4
votes
1answer
715 views

Why should one use update-locale instead of directly setting LANGUAGE?

In Debian, I am used to set the LANGUAGE environment variable in /etc/environment. Now with Debian testing I found /etc/default/locale, which is updated by update-locale. The update-locale man page ...
0
votes
1answer
264 views

/etc/machine-info is missing

I am following a tutorial about Linux networking. Tutorial mentions about /etc/machine-info file but my Ubuntu system is missing this file. I just have /etc/machine-id. Tutorial is on CentOS. Are ...
4
votes
2answers
56 views

How to switch between different Linux configurations?

I have several different use cases for my Raspberry Pi 3. Currently I have a configuration for it as a media centre, for streaming audio, for hacking purposes, office workplace, etc. All ...
7
votes
1answer
3k views

Use `/etc/paths` or `/etc/paths.d` to add items to the PATH in macOS Sierra?

From what I have gleaned in various places with discussions about /usr/libexec/path_helper and all, apparently the modern way to add items to the environment variable PATH in macOS Sierra 10.12 is to ...
1
vote
0answers
671 views

Changing home directory by editing /etc/passwd

I am reading a book about Linux. It says that one of the ways (although not the best - I am aware that this can also be done with usermod) to change the home directory of a user is to change the home ...
-3
votes
1answer
76 views

The second field in /etc/shadow shows “!*” for user “bin” , “uucp” and few other service accounts as well. Can anyome explain the reason for !*? [duplicate]

The second field in /etc/shadow shows "!" for user "bin" , "uucp" and few other service accounts as well. Can anyone explain the reason for "!" ?
0
votes
1answer
665 views

/etc/passwd update not working

In one of the machines I work with I'm seeing a strange behaviour. I've manually changed the shell of one user in /etc/passwd but when I try to login with that user, it still uses the old one. getent ...
17
votes
1answer
5k views

/etc/udev/rules.d/ vs /lib/udev/rules.d/ - which to use and why?

The Arch wiki recommended creating a file in /etc/udev/rules.d/ to fix my Steam controller issues. This worked! However, I noticed that there are no other rules in this folder except for the one I ...
0
votes
1answer
74 views

What is wrong with my copy command?

I did the following to my mac with the intention to copy the /etc in /tmp to try something: $cd /tmp $cp -a /etc . $cd etc -bash: cd: etc: No such file or directory $ls -all etc ...
0
votes
1answer
310 views

/etc/profile doesn't seem to be sourced in any situation

I added these to /etc/profile (Ubuntu 15.10). PATH=$PATH:/my/bin date > /tmp/etc_profile_date When I graphical login, /my/bin is not in PATH and /tmp/etc_profile_date has not been created. When ...