Solved

change UID for accounts in Linux (Redhat)

Posted on 2006-11-15
4
1,026 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help on running oracle SQL script in linux 3 59
linux redhat 7.2 10 88
Linux boot cd to do hardware report on PC? 3 52
bash file 10 49
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

809 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