After reboot, suddenly "root" is only user available at login screen


Does your user name and/or full user name use any of these words?
filter << "server" << "daemon" << "database" << "system"<< "account"<<"pseudo";
Those are all blacklisted in PCDM itself as “fake” login accounts which should not be displayed as options (expecially if the uid <1000 - but I think the filter applies for everything).

Here is the code if you want to look it over (line 121 and on, the parseUserLine() function).


Just following up with the important bit from the PCDM source code: if “bad” ever becomes true then the user will be skipped/ignored:

if(!QFile::exists(shell) && validShells.contains(shell)){ fixshell = true; }
    // Shell Checks
    if(shell.contains("nologin") || shell.isEmpty() ){bad=true;}
    else if( !QFile::exists(shell) && !fixshell ){ bad = true; }
    // User Home Dir
    else if(info[5].contains("nonexistent") || info[5].contains("/empty") || info[5].isEmpty() ){bad=true;}
    // uid > 0
    else if(info[2].toInt() < 1){bad=!allowroot;} //don't show the root user
    else if(info[0].indexOf("picoauth") != -1){bad=true;} //don't show pico connect users
    //Check that the name/description does not contain "server"
    else if(info[2].toInt() < 1000){
	if(!allowunder1kUID){ bad = true;} //ignore anything under UID 1000
	  //Apply the special <1000 filters
	  if(excludedUsers.contains(info[0])){ bad = true; }
	  for(int f=0;f<filter.length() && !bad; f++){
	    if(dispcheck.contains(filter[f])){ bad = true; }

Note that the “filters” I pasted above look like they only are used for UID<1000 - so that is not the problem here.


Just to be sure, here is the relevant line from /etc/passwd:

julf:*:1001:1001:Johan Helsingius:/usr/home/julf:/usr/local/bin/bash

ls -l /usr/local/bin/bash
-rwxr-xr-x 1 root wheel 1124816 18 Mar 19:16 /usr/local/bin/bash

ls -ld /usr/home/julf
drwxr-xr-x 21 julf julf 47 18 Apr 09:34 /usr/home/julf

/usr/local/bin/bash is listed in /etc/shells


Everything in your user entry checks out just fine.
Not sure what is going on in that case - seems like PCDM (via getent passwd) cannot get that line at startup for some reason then.


Anything I can test or any log entries to look for?


OK, wanted to delete the user and recreate it. rmuser fails with the error “mailspool passwdpw: entry inconsistent”, and adduser fails with “user exists”.


That is interesting. looks like the rmuser command is detecting a problem with the entry.
Can you add a different user? Did you ever just edit the /etc/passwd file to change anything?


Yes, successfully added a different user. Is there a way to synchronize /etc/passwd and the *.db files?


Not sure if this will do it, but try the “vipw” command as root or sudo. That sets a bunch of locks and does other things so it may do what you need.

Does the added user show up in the PCDM list?


Yes, the new user shows up. /etc/passwd entries look exactly the same apart from passwords and uid/user name.


But now “root” isn’t on the list any more when I log in.


Do you have ALLOW_ROOT=TRUE? If not then that’s why root is not there. @beanpole135 can tell us if “no users” winds up showing “root” by default.


No ALLOW_ROOT line at all. What is the default?


I mentioned this already, but the “root” user will only show up in one of two situations:

  1. ALLOW_ROOT=TRUE (allow the root user to show up alongside all the other users)
  2. No users found - allow the root user as a last-ditch fallback.

@Julf is falling into case #2, where none of the users on his system can be seen by PCDM - so it allows root to login instead.


Sorry, I missed the part about “no users found” earlier.


OK, so my problem is really that the user information database is inconsistent. chpass fails with “entry inconsistent” and “pw_copy: Invalid argument”.