Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Others => Miscellaneous => Topic started by: sravanth.svk on April 15, 2006, 12:55:46 PM

Title: create user with duplicate UID
Post by: sravanth.svk on April 15, 2006, 12:55:46 PM
hi to linux community
i want to know how to create a duplicate user with
the useradd -o option i.e, the syntax to add a user sss with the same uid as root and he should have the same group id even
Title: create user with duplicate UID
Post by: Ricky on April 15, 2006, 05:03:07 PM
Well.. syntax for useradd is as follow :
Code: [Select]
useradd [-c comment] [-d home_dir] [-e expire_date] [-f inactive_time] [-g initial_group] [-G group[,...]] [-m [-k skeleton_dir]] [-p passwd] [-s shell] [-u uid [ -o]] login

Now if want to create a user with similar UID as another then . you can do following..
Code: [Select]
useradd -u <UID HERE> -o <NEW USER NAME>
Ofcourse there are other options but what you are asking for must look as above.

but existing UID so that it can be assign to other user as well. Both user will be able to see each other's details and files etc.
Title: thank u ricky
Post by: sravanth.svk on April 17, 2006, 10:50:23 AM
thank u for ur ans.
u said ther r other ways even to make a duplicate user
can u even tell them
Title: Duplicate User is not final solution
Post by: gadekishore on April 17, 2006, 11:37:53 AM
Creating duplicate user(UID) for root is not good.... as a Sys admin you can give Sudo permissions for normal users..

try with #visudo or vi /etc/sudoers
Title: Re: thank u ricky
Post by: Ricky on April 17, 2006, 11:40:55 AM
Quote from: "sravanth.svk"
thank u for ur ans.
u said ther r other ways even to make a duplicate user
can u even tell them


I meant there that there are other options / arugments which can also be given .
Title: thanks
Post by: sravanth.svk on April 18, 2006, 01:57:34 PM
thanks
 :)