Best way of changing users numbers?

For some reason which totally escapes me, someone, somewhere deceided that default user numbers would now run from 1000, whereas before they ran from 500.

So, give that I now need to change some user numbers on an older machine to match newer installed machines, what is the best way to do it?

Is it simply a matter of changing the numbers in /etc/passwd, then chown -R user-name:user-name /home/user-name ?

and changing the base user number?

No votes yet

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Oh if only it were that

Oh if only it were that simple...

No, first you need to determine the user and group for each file in the home directory (I assume the rest of the filesystem isn't a problem because those files will be owned/grouped by root or some non-existent system user).

Then you have to change the numbering in passwd and group, then finally restore the new user/group via chown.

BUT if you only have a handful of users and they do not share files as group (for example, John and Jane are members of "qwerty" and either can edit files in /home/qwerty_data) then you can do as you suggested and just do chown -R username:usergroup on each of the /home/ directories.

What system did you last install? I could be wrong but I thought Debian had started users at ID# 1000 for at least the past 4 years...

It is all debian

All my systems are Debian.
The last three installs are Debian sarge. Maybe one was debian woody orginally but it has been dist-upgraded.

the "now" problem machine is my machine, which evolved from debian potato.

500 was convenient becvause it worked with rh machines as well, but they have all gone (from here).

of course, I also remember when they all used base user = 100

I am returning this site to a fileserver model, rather than peering model. It really isn't feasible to drag 160mb across the internal network each time I do a backup, even thoough it is a lightly loaded 100mb network. So nfs for linux clients and samba for ms clients

thanks for the feedback.

Syndicate content