Solved

change UID for accounts in Linux (Redhat)

Posted on 2006-11-15
4
1,045 Views
Last Modified: 2008-02-01
Due to some requirements, I need to change some users account UID.
I need to know what are the necessary/relevant changes that need to be made once the UIDs are changed. And also how do they related to processes and file permissions and to the applications & DBs running on the systems.

Bottomline is I do not want to change something which I am not aware of the consequences.
0
Comment
Question by:dc-ops
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
ssvl earned 250 total points
ID: 17945657
you can always check with

find / -uid xxx

where uid is the number of the person whose uid you want to change.  this gives a list of all files owned by that person / user.

if nothing dangerous appears on the list, (apart from the home directory files or one odd files), then you can go ahead and change the uid of the person.

what are the "applications and DBs running" on the system.  i recently saw a script by someone who had given a bash scrip for changing the UID of files owned by a particular person.  but that is secondary.
0
 
LVL 10

Expert Comment

by:ssvl
ID: 17945662
for a change you might want to look at mail, home direcotry files and other things before and after change
0
 
LVL 10

Expert Comment

by:ssvl
ID: 17946049
if  You want to simply change the uid for user  use

# usermod -u <new uid> username
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 17950275
Once you change the UID of a regular user, that user will cease to own his home dir and files within. As root you can fix this:-

# usermod -u <new uid> username

# chown -R username: ~username

The colon after username changes the group of the user's files to his default group - miss it out if you're not planning to change that. To make sure you're going to work on the rigt directory, yo can "echo ~username" first - that should echo the path of the user's home dir.

If you are changing the UID of a system user (mailer or whatever), follow the advice posted earlier (find command &c)
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question