UID issue

I'm having a weird UID issue.

I have a single FreeBSD server. It has a root account and 1 single user account. It has only ever had 1 user account created. Since being created, the user account has not changed, nor has the password been changed. It is a couple months old and does not serve anything to the outside world.

The single user account is on UID 1001.

Today, I log into the server and notice all of the directories & files, outside of the /home/username directory, created by this user account, have changed UID to 1002. The home directory and files still show the proper username/wheel. But, in separate directories, outside of /home/username, the directories & files I know I created with this user account, are now listed as 1002/wheel.

For instance, I have a directory named /box.
The single user account has full access inside /box.

I have created several directories and files within /box using this single user account. All of them show 1002/wheel instead of username/wheel.
The directories/files created by root seem ok.

All of the directories and files in /home/username show the proper username/wheel.

Code:
/home
/box
/box2

are all separate partitions on separate physical drives.
The problem only shows up in /box and /box2.

I know this is a problem that would most likely require a lot more background to solve. Just curious if maybe this is something someone is really familiar with and might know whats going on. Or point me in right direction to start working on figuring this out?

There are no other user accounts above 1001.
There are some accounts created post installation, like mysql, vboxuser, etc. But no actual user accounts.
 
You can always check what the system thinks of the user account with this:

# getent passwd username

I suspect that your /etc/master.passwd and the associated database are out of sync, try running this:

# pwd_mkdb /etc/master.passwd
 
I don't have enough experience to know whether something is normal or not yet. But, something else I noticed;

The directories and files that were changed to 1002/wheel are all 1002/wheel. Wheel for group. While, my /home/username directories and files are all username/username. No wheel.

If I create a new directory in my home directory it is username/username. As are all the other directories and files in /home/username.
But, if I create a new directory in /box it is username/wheel.

Where is it determined, what inherent permission is set when creating a directory? And how is this particular for different places. Does my system have username/wheel systemwide, but username/username for local home?

There are no flags set on /home/username /box /box2

$ ls -lo shows - for flags.

$ getent passwd username
Shows the proper information, UID 1001.

I have since ran # pwd_mkdb /etc/master.passwd
But the directories are all still 1002/wheel.

I have started running $ sudo chown -R username /directory to start fixing the issue. I'm just worried the problem is still here.

This user account is the only account created after installation. So, I don't understand how a second account was created? With UID 1002, and somehow became owner of all those directories, and then was removed?
 
Did you share those directories with samba or NFS? That might explain the change.
 
Yeah, good idea. But, I'm not exporting anything. Nor do I have Samba setup. I use libsmbclient, but don't have a full Samba setup. Not sharing anything with Samba.
 
What does [cmd=]id 1002[/cmd] return? Is it possible that you deleted an account, maybe deleting software that in turn modified the account? In my opinion you got somewhere this account that has been removed. The fact then that a directory belongs to the group wheel depends on the permissions on the directory itself (e.g., sticky bit for the group).
 
Back
Top