Quote:
Originally posted by homesp
I want to change the only usual user (not root) on my Debian/GNU
How could I do that will take less risk effecting my installed software?
Is it enough that only change the file /etc/passwd ?
|
If you're changing the numbers that identify a user and group, you will have to use the
find command to change any files/directories with the old id numbers.....Plus you will need to edit the /etc/group file to change the gid number.....
To do this you will need to remember the old uid/gid numbers, then
after making changes in the /etc/passwd file for the user id number, and the /etc/group file for the group id number, find and change any files/directories like so (as root to avoid possible error messages):
Changing user name
find / -uid <
old uid number> -exec chown <
new uid number or name> {} \;
Changing group name
find / -gid <
old gid number> -exec chgrp <
new gid number or name> {} \;
Of course, if you're only changing the user and group names without changing the uid/gid numbers, then you only need to make the changes in /etc/passwd and /etc/group and not worry about find any file or directories..........
HTH