November 22, 2024, 11:08:05 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: create user with duplicate UID  (Read 13831 times)

Offline sravanth.svk

  • Linux Noob !
  • *
  • Posts: 13
create user with duplicate UID
« 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

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
create user with duplicate UID
« Reply #1 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.

Offline sravanth.svk

  • Linux Noob !
  • *
  • Posts: 13
thank u ricky
« Reply #2 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

Offline gadekishore

  • Linux Noob !
  • *
  • Posts: 13
Duplicate User is not final solution
« Reply #3 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

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: thank u ricky
« Reply #4 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 .

Offline sravanth.svk

  • Linux Noob !
  • *
  • Posts: 13
thanks
« Reply #5 on: April 18, 2006, 01:57:34 PM »
thanks
 :)