Linux distros are increasingly becoming more and more GUI-based and easier for beginners to use. That said, their real power still lies in the terminal which requires the user to know different commands and syntaxes to be able to use them properly. The same applies to troubleshooting any errors you might encounter as Linux isn’t exactly the most helpful OS when it comes to error messages.
In this article, we’re talking about the “Error initialising the supplementary group access list” issue on Linux, its causes and what you can do to fix the problem.
What causes this error?
The error is mainly caused after the user makes a change in the user or user group access permissions. Outside of making the change itself, there are additional steps that you need to follow to ensure the OS recognise those changes.
Other causes include:
- The user hasn’t refreshed the OS after making the change.
- Incorrect configuration file was changed.
- The user or group permissions aren’t set correctly.
- If a script is making the change, it has syntax or logical errors.
Also read: How to count files in a directory in Linux?
How to fix this?
Here are three fixes you can try out.
Log out and log back in again
Changes like these tend to work on the system level. While you don’t necessarily need to reboot your PC for them to take effect, you do need to log out and log back in again for them to take effect. This is especially true in the case of users and groups and requires the user to refresh their login shell for the settings to take effect.
Use the right method
Depending on your script, you might be using the initgroups() or setgroups() methods. Based on what you’re trying to do, make sure to correctly implement the appropriate method. In most cases, initgroups() method will work just fine as it initialises the group access list by reading the group database stored in / etc / group using all groups where the currently active user is the member.
Check your commands
Alternatively, add users to a group using the addgroup command. Here’s the general syntax.
sudo addgroup [username] [groupname]
Run the aforementioned command to add the currently active user to the specified group and you shouldn’t have to deal with the error.
Also read: Linux Zgrep command explained