Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
97 views

Shouldn't files in /etc/xdg/autostart/ be removed when removing a package?

I came across the messages below with sudo journalctl --since today | tail -n 3000. Shouldn't autostart entries be removed from there when removing a package? It seems like general good practice to ...
mYnDstrEAm's user avatar
  • 4,340
0 votes
1 answer
89 views

Fake /etc/os-release for an application to make it think it runs on Ubuntu instead of Debian

I have to use a third party software which officially supports RHEL, SuSE (SLE[DS]) and a certain Ubuntu LTS release. Unfortunately, I use Debian on all my systems. If I run the installer script of ...
MrSnrub's user avatar
  • 135
0 votes
1 answer
3k views

Read/write /etc with read-only filesystem

I have a setup for an embedded project where I'd like to keep the root filesystem read-only and system configuration on a read/write partition. Users cannot install programs, but they can modify ...
A. Que's user avatar
  • 643
7 votes
5 answers
2k views

Is it a good idea to replace files in etc with symlinks?

I don't switch machines that often, but I don't want to be bound to 1 machine. Often the reason I'm not upgrading my hardware is because I don't want to be setting up a new machine. So far I've made ...
php_nub_qq's user avatar
4 votes
2 answers
1k views

Entries in /etc/passwd are all duplicated (and entries in /etc/shadow are also all duplicated)

Checking the two files /etc/passwd and /etc/shadow on a standard Linux distro, it appears all entries are duplicated in both files: in /etc/passwd, all entries are duplicated (2 lines for each ...
Glendalough's user avatar
0 votes
1 answer
145 views

Convention to install files to /etc/ as non-root?

This question possibly has relevance in both Unix & Linux and Stack Overflow; I'm posting at Unix & Linux first, because I think I'd like to understand the issue from the perspective of Unix/...
StoneThrow's user avatar
  • 1,737
3 votes
2 answers
244 views

Why does the output of testparm differ from /etc/samba/smb.conf?

This is the output of the [global] section of the /etc/samba/smb.conf of a random Synology NAS: ~# cat /etc/samba/smb.conf [global] printcap name=cups winbind enum groups=yes ...
mgutt's user avatar
  • 487
0 votes
1 answer
69 views

user login not working after overwriting /etc

I used rsync -aiiP to copy the /etc from my old laptop to the /etc of my new laptop. After locking the screen and trying to log back in, my password no longer works. I rebooted but it gets stuck on ...
bit's user avatar
  • 1,106
0 votes
0 answers
62 views

Damage control after erasing /etc in Cygwin?

I was doing housekeeping using the Windows adminstrator account, and I erased Cygwin's /etc folder tree. I cannot reinstall Cygwin, as I was in the process of taking stock of what files I need to ...
user2153235's user avatar
3 votes
1 answer
2k views

How to see all config files that differ from package maintainers' versions in Debian?

When installing an upgrade with sudo apt-get upgrade it displays: Configuration file '/etc/grub.d/30_os-prober' ==> Modified (by you or by a script) since installation. ==> Package distributor ...
mYnDstrEAm's user avatar
  • 4,340
0 votes
1 answer
2k views

How to reset the printing system (CUPS)?

I would like to know how to cleanly reset the printing system (CUPS) to its initial state. Alternatively, it may suffice for me to know how to take a "snapshot" of CUPS configuration and to ...
Alexey's user avatar
  • 2,008
0 votes
1 answer
349 views

make /etc/profile take effect permanently

https://help.ubuntu.com/community/EnvironmentVariables#Persistent_environment_variables https://unix.stackexchange.com/search?page=1&tab=Relevance&q=automatically%20source%20%2fetc%2fprofile ...
jian's user avatar
  • 577
0 votes
1 answer
82 views

etc shadow file for passwd - calculate not only date but time

I want to know if there is a way to get the last password change date + time stamp ?
yolook_daemon's user avatar
0 votes
1 answer
220 views

I am not sure about correct way to export PATH

I have Java and Springboot cli added to PATH however, when source /etc/profile it gives error. And on restarting PC, BASH is not loading. My export in /etc/profile export JAVA_HOME=/usr/lib/jvm/java-1....
Susobhan Das's user avatar
0 votes
1 answer
232 views

A script /etc/profile.d/{script1}.sh doesn't work correctly

cat /etc/profile.d/atlassian-plugin-sdk.sh export PATH=$PATH:/opt/atlassian/plugin-sdk/bin ls -al /etc/profile.d/atlassian-plugin-sdk.sh -rwxr-xr-x 1 root root 48 Apr 17 21:36 /etc/profile.d/...
perelium's user avatar
1 vote
0 answers
162 views

Does "no-auto-down" and "no-scripts" support pattern matching interfaces in /etc/network/interfaces?

I tried reading the manual from https://man.cx/interfaces(5) and searching for some open-source code. But I didn't find any specific description of the option of "no-auto-down" and "no-...
DanoR's user avatar
  • 143
3 votes
1 answer
2k views

Recovering /etc/passwd file

I deleted my /etc/passwd with my fat fingers. I saw that there is a /etc/passwd- that looks like a backup file but I cannot copy it to restore the original one since I can't sudo anymore. My volume is ...
zakrapovic's user avatar
0 votes
2 answers
1k views

Where should I source /usr/local/etc/profile from? .bash_profile or /etc/profile?

I know that, by default, bash will source /etc/profile and ~/.bash_profile. Now, suppose I also have machine-specific profile commands in /usr/local/etc/profile (involving stuff that's in /usr/local, ...
einpoklum's user avatar
  • 9,585
1 vote
0 answers
3k views

Why is `pam_nologin.so` denying access despite no existence of `/etc/nologin`?

After A lot of searching, I managed to debug a PAM configuration file, and it turns out the pam_nologin.so module was denying access to my system. Now, this is particularly strange since, according to ...
JSONMagic's user avatar
-2 votes
1 answer
3k views

How to use curl to get a file from a specific directory?

I'm working on the VulnBox DriftingBlues 7. I'm trying to figure out how to curl from, for example, /etc. I can't figure out the syntax though. I'm trying to do something like this: curl http://vuln....
alex Provencher's user avatar
1 vote
0 answers
73 views

Can ADB debugging make XAPK downloads possible?

I have just got the adb debugging method started on my chrome os for an alternate developer mode approach. However, I noticed that apks are starting to transfer into XAPKS which are a somewhat ...
Dexsas's user avatar
  • 13
0 votes
0 answers
52 views

Why is the IP address lookup in /etc/hosts only sometimes work?

The '/etc/hosts' file in a Linux laptop (with LAN IP 172.17.37.21) by default contains : 127.0.1.1 Acer-Aspire-6930G When I want to reach this laptop wirelessly from a smartphone or a PC using an FTP ...
Petoetje59's user avatar
2 votes
2 answers
1k views

Removed /etc folder how do I keep my data after booting

I accidently removed the whole /etc folder (rm -f /etc) please don't ask why I was in a rush. Then I panicked and restarted my computer. Now all I have is GRUB. Is there a way to recover my data? I'm ...
A GP's user avatar
  • 21
1 vote
1 answer
1k views

Why does Kali Linux have other existing users from /etc/passwd file? I never created these users

I simply wanted to see my user that I just created in the terminal but I came across this sea of users in my existing Kali Linux vm. The command I used displayed a list of users. It started with "...
StackingWaffles's user avatar
1 vote
2 answers
102 views

What if I wanted /etc to be called something else?

Aside from the kernel itself, the Filesystem Hierarchy Standard is perhaps the only major feature common to all linux systems. Some obscure distributions modify it only slightly: stali, for example, ...
segfault's user avatar
1 vote
1 answer
149 views

Is it safe to hardcode /etc/ path for configurations in an application I'm contributing to?

The application I'm contributing to requires configuration files as a part of its operation. This is currently placed within the root directory of the application. If I followed the FHS, the config ...
rsn's user avatar
  • 119
1 vote
4 answers
2k views

Is /etc/services actively used when an application binds to a port?

When an application is looking for a port to bind to, is /etc/services actively searched to ensure there are no clashes?  I.e., if a port is registered in /etc/services, is it reserved whether it’s ...
Julian Rogan's user avatar
0 votes
1 answer
590 views

Trying to understand the /etc/resolv.conf

I am trying to understand the entries in the /etc/resolv.conf file in linux systems. The file contains a list of keywords and values. This is an example of the contents of the /etc/resolv.conf: ...
Yousif Dafalla's user avatar
0 votes
1 answer
242 views

Error when loading /home/user_name/.profile

I was trying to install awesomeWM and after logging out i saw this message. Error when loading /home/user_name/.profile tput: No value for $TERM and no -T specified As a result the session will not ...
Siddharth kumar's user avatar
1 vote
1 answer
261 views

What will happen if I add 1 million lines in /etc/hosts/ [duplicate]

I am trying to write a website blocker and the simplest thing I found is putting lines at the end of /etc/hosts. If I want ot have 1 million websites blocked that redirect to localhost would that slow ...
Deyan Dachev's user avatar
0 votes
1 answer
157 views

How to display a system account with the highest user id

root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/...
Adil Ali's user avatar
0 votes
1 answer
597 views

What to do when you can't edit /etc/hosts

I need to override DNS for a few hostnames on a Linux Centos 7 machine. I do not have write access to the file, however. What can I do in this case?
JoshK's user avatar
  • 109
1 vote
1 answer
221 views

env variable in /etc/ld.so.conf

I've created a test.conf file in /etc/ld.so.conf.d/ folder with written: TEST_PATH=/path/To/My/Parent/Folder In my /etc/ld.so.conf I've added instead: $TEST_PATH/mylib1 $TEST_PATH/mylib2 $...
veltres's user avatar
  • 13
1 vote
2 answers
2k views

Someone is locking /etc/group for a very long time - what to do?

I want to change something in /etc/group - namely, to add some user to some group. But something - I don't know what or who - has created an /etc/group.lock file. fuser /etc/group.lock gives nothing, ...
einpoklum's user avatar
  • 9,585
6 votes
1 answer
2k views

What replaces /etc/services in openSUSE, and how

I am running openSUSE Linux, the Tumbleweed version. I discovered that it does not use an /etc/services file, though I do not know what is replacing it, or how it is done, and I do not have much ...
babou's user avatar
  • 848
0 votes
1 answer
541 views

Alternative to modifying /etc/hosts for dns lookup

I am a networking newb - ping cannot locate certain dns names, so I put them in /etc/hosts like this: 10.128.0.22 kafka.marathn.meso 10.128.0.31 elasticsearch.marathn.meso and then ping can find ...
Alexander Mills's user avatar
0 votes
1 answer
479 views

Why systemd stopping immediatly after spawning?

I am facing issue while loading vpp.service in systemd. I have written following service. [Unit] Description=Vector Packet Processing Process After=syslog.target network.target auditd.service [...
Gaurav Joshi's user avatar
1 vote
2 answers
3k views

How can I `usermod` old users with new `/etc/skel` files?

I want to "update" old users with new /etc/skel content on Debian and Ubuntu installations. Scripting this is possible... find /home -maxdepth 1 -mindepth 1 -type d | while read homedir; do user="...
therealneil's user avatar
2 votes
1 answer
716 views

Persisting sshd_config settings

When modifying Linux configuration files, it is often recommended to place local changes under a .d directory, e.g., /etc/sudoers.d/ or /etc/apt/sources.list.d. In my understanding this is to avoid ...
user2563661's user avatar
1 vote
0 answers
190 views

Stuck setting up multiple network interfaces with one gateway using /etc/network/interfaces

I'm an advanced noob and I'm running into the limitations of my understanding of how to set up my network. My gateway to the internet should be 10.0.1.1, and I have 2 PCI 10ge nic cards installed to ...
Cam Wrangles's user avatar
8 votes
1 answer
1k views

Can msmtp rewrite addresses?

I am trying to get all my system emails to be forwarded to my gmail address, using msmtp 1.8.3 and /etc/aliases on debian. It works, but I get errors from gmail. When I email root (via echo "hello ...
user48678's user avatar
  • 209
2 votes
1 answer
2k views

Strange issue with DNS: drill works but getent hosts does not

I'm running Arch Linux ARM on a Raspberry Pi 4. I'm currently having an issue with the domain resolution. The "user space" applications including ping, web browser, etc. do not resolve hosts, although ...
Tatpurusha's user avatar
1 vote
1 answer
130 views

Use /etc/profile settings for passwordless user

I'm having a small issue. I have a passwordless user (jenkins) on a Unix system. This user is used by jenkins to perform some commands. Because I installed nvm on this unix system, I needed to add to /...
medo's user avatar
  • 13
0 votes
1 answer
6k views

vsftpd service does not start saying vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

I am configuring with Ansible a VM running Ubuntu to run this FTP server: vsftpd, however after the installation when I inspect the logs with journalctl -u vsftpd.service I see: Nov 20 17:49:58 my-vm ...
TPPZ's user avatar
  • 517
0 votes
1 answer
656 views

Password Settings of AIX

esaadmin: password = * dbahx: password = ************* sysgina: password = ************* fsecbp: password = C6qoi9yK.H0So Hi All, I am trying to understand what does password = **...
teo93's user avatar
  • 7
1 vote
1 answer
99 views

Git/etckeeper shared between systems

I've four Raspberry PiZeroW on my system running ArchLinux ARM (alarm) that I use solely as snapclient for streaming music synchronously about the house. Initially I had one PiZeroW and I used ...
slackline's user avatar
  • 541
1 vote
0 answers
122 views

How to create user who will not be using /etc/passwd for authentication?

I want to add a user to my Ubuntu who will be authenticated using SQLite or another database. I don't want to use /etc/passwd file. How can I achieve it?
Chetan Mane's user avatar
0 votes
2 answers
2k views

Unable to save file in /etc/ssh/ because incorrect permissions (Linux Mint/Debian)

When I attempt to edit '/etc/ssh/sshd_config', and save the file, I get an error saying: 'Could not save the file /etc/ssh/sshd_config. You do not have the permissions necessary to save the file.. ...
Trevor Hummer's user avatar
2 votes
2 answers
2k views

backup - can I use git to backup /etc? [duplicate]

I am using mac, and /etc is just a symlink to /private/etc, which contains hundreds of (important) configuration files, and the total size of /private/etc directory is smaller than 1 MB. Is it a good ...
Teddy C's user avatar
  • 457
3 votes
2 answers
596 views

Is the .d notation for folders in /etc recommended or not?

When building a new software that will store a directory of configuration files in /etc, should the directory be named software_name.d or just software_name? I can't seem to find good style guides ...
RobinSt's user avatar
  • 41