0

I am getting the following error when I try to add a new user

 sh-4.2$ sudo adduser mbyousaf
adduser: /etc/gshadow.1341: Structure needs cleaning
adduser: cannot lock /etc/gshadow; try again later.

I have checked the /etc/passwd file and the above user does not exist

Any solutions?

Bilal Yousaf
  • 101
  • 1
  • 2
    This might be independent from `useradd` and is possibly a corrupted file system. [Check this](https://unix.stackexchange.com/questions/330742/cannot-remove-file-structure-needs-cleaning) and make sure you create a proper backup! – FelixJN Dec 09 '20 at 10:34
  • 1
    Possible duplicate of https://unix.stackexchange.com/questions/330742/cannot-remove-file-structure-needs-cleaning – Rui F Ribeiro Dec 09 '20 at 11:11
  • don't think it related to that, as I am only just trying to create a new user – Bilal Yousaf Dec 09 '20 at 12:03
  • Isn't `adduser` a script? `file $( type -p adduser )`, `less $( type -p adduser )`. – waltinator Dec 10 '20 at 00:42

0 Answers0