Change uid on Linux machines

Going through and changing a bunch of user ids. I'm doing this over time and keep forgetting the syntax and run a man every time. Thought I'd put the skeleton command here:

usermod -d /path/to/newhomedir -m -l newuserid originaluserid

Update a uid from user1 to newuser1:

 usermod -d /home/newuser1 -m -l newuser1 user1

Comments

Popular posts from this blog

Database, schema, and table sizes in Greenplum

Greenplum update with multiple tables

Show running queries on Postgresql/Greenplum