LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-25-2006, 01:04 PM   #1
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Rep: Reputation: 16
Change globally userID


Hallo everyone,
I have problem with file permisions. Let me describe the nature of the problem. I had a old server installation (9.1) and 3 clients (10.0). At the server, userids starts from 500 (due to upgrated since 6.2!).
Now, the 3 clients are relatively new pcs, (older installation was 9.2), and the userids start from 1000. Is there any way to change (preferably using a bash script) the userids on the server thus to match the 3 clients? I cannot manually change the userids (there are 23 users on the server, 3 linux and 20 windows clients.

Thank you in advanced.
Peter
 
Old 01-25-2006, 02:29 PM   #2
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 184

Rep: Reputation: 36
use this template in bash (replax the x's):

find / -user 50x -exec chown 100x '{}' \;

(the last symbol is a semicolumn)
it looks for all the files of user 50x and changes
ownership to 100x, just do this for all your users

as a test you can list all files of user 50x
find / -user 50x -print

regards

tlowk
 
Old 01-26-2006, 03:19 PM   #3
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
Thank you for your perfect solution.
A simple for loop will do the trick. For whom it might concerns, you can use the
find / -group 50x -exec chgrp 100x '{}' ;
to change the group too...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change userID now can't logon to system saraeliz Linux - Newbie 5 10-11-2005 08:07 PM
Finding Addresses Globally nodotnet Linux - Software 0 08-18-2004 03:52 PM
How to install Firefox 9.1 Globally? rignes Linux - Software 8 07-25-2004 12:36 AM
i would like to change my forum userid. How? skoona LQ Suggestions & Feedback 5 06-11-2004 10:06 PM
userid expiry ust Linux - Software 1 09-25-2003 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration