BuycPanel Blog

BuycPanel Blog

Latest news and updates

What are the Key Account Creations Errors and Quick Fix for Each?

Posted by Allura on 12 07 2019.

Introduction
There are times when a user faces some common account creation errors while working. This document will outline these errors and will mark the necessary steps to troubleshoot them. One can read our Account Creation Errors  documentation to get more valid information about account creation.The groupadd & useradd Errors
User can receive these kind of errors due to several reasons. They are:
Immutable Files
In case, the /etc/passwd or /etc/group files hold the immutable flag within them, the system will not be able to edit them. Also, it cannot add the account to the server.One can run these following commands in order to check the files:lsattr /etc/grouplsattr /etc/shadowIf the files are caught holding the immutable flag, it will return ‘i’ in these commands’ output.User has to then run these following commands to remove this flag from the files:chattr -i /etc/passwdchattr -i /etc/groupCorrupt Group Shadow File
The system will fail to add the account to…

Introduction

There are times when a user faces some common account creation errors while working. This document will outline these errors and will mark the necessary steps to troubleshoot them. One can read our Account Creation Errors  documentation to get more valid information about account creation.

The groupadd & useradd Errors

User can receive these kind of errors due to several reasons. They are:

Immutable Files

In case, the /etc/passwd or /etc/group files hold the immutable flag within them, the system will not be able to edit them. Also, it cannot add the account to the server.

One can run these following commands in order to check the files:

lsattr /etc/group

lsattr /etc/shadow

If the files are caught holding the immutable flag, it will return ‘i’ in these commands’ output.

User has to then run these following commands to remove this flag from the files:

chattr -i /etc/passwd

chattr -i /etc/group

Corrupt Group Shadow File

The system will fail to add the account to the server, if the /etc/gshadow file becomes corrupt. Each group in the /etc/groups file, as in the /etc/gshadow file must include a line in the groupname::: format, where groupname  will represent the group name. Any /etc/gshadow file where this line is missing, is corrupt.

There are steps to rebuilt these corrupt files:

Steps:

  • Firstly, a user has to run this following command in order to move the existing /etc/gshadow file:

mv /etc/gshadow /etc/gshadow.corrupt

  • Then user has to run the grpconv command in order to rebuild the corrupt file.
  • If it exists, then a user has to finally delete the /etc/grshadow.lock and /etc/group.lock files.

Unable to Add User Errors

There may be a chance of another user already existing on the actual user’s system. He can doubt it if the system returns an unable to add the user error. There are steps to check this possibility:

Steps:

  • User can start his attempt by navigating to the /home/username directory, where username will represent the account username.
  • Then he has to check the contents of the /etc/passwd directory for an entry of that user.

Conclusion

All information on the key account creation errors and how to troubleshoot them is outlined in this review.