Re: Safe change of uid
Douglas A. Tutty wrote:
Kuser is the KDE gui that's supposed to take the place of the command
line user management. It follows the Red Hat convention of users uid
starting at 500 instead of the Debian rule that starts them at 1000.
From what I've read, it's like deluser in that it only deletes the user
stuff in the home directory, so I still need to edit /etc/passwd,
/etc/group, /etc/shadow, etc. and delete the user's group. Or is there a
command to take care of those, too? If there is, I haven't found it yet.
Or will adduser overwrite the previous info when I add the new user of
the same name?
On Mon, May 11, 2009 at 08:54:47AM -0500, Elmer E. Dow wrote:
Just finished a fresh Lenny install and added an account for my daughter
-- and kuser assigned it uid 500 instead of 1001, which I must correct.
After looking at man pages and archives, I see that kuser in the past
has done well creating accounts but not modifying them. Is that still
true with the version used in Lenny? Is usermod a better option for
dealing with this situation or would deleting and recreating the account
-- either using kuser or userdel -- be the simplest and best method?
Please cc me as I am not currently subscribing to the list.
Since you only just created the user, I'd just go ahead and delete it
# cd /var/tmp
# deluser --remove-all-files --backup
then use adduser to create the new user
To be safe, I'd then examine the backup tarball to ensure that nothing
was removed accidentally, before deleting the tarball.
I've never used (or heard of) kuser to know why it created uid 500.
I've read of permission problems, boot problems, etc. caused by changing
uid so I'm a bit paranoid.
Thanks for reminding me to --backup.