Author Topic: Adding new user  (Read 613 times)

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
Adding new user
« on: 3 December 2002, 05:28 »
I need to make a new user, one with root powers (i.e superuser).

I did usradd, and it worked. I opened /etc/passwd, but the user wasn't there! I made a new user, told it to use group "0." Tried to login, doesn't work! Help!

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Adding new user
« Reply #1 on: 3 December 2002, 05:38 »
What distro? Normally you wouldn't want to create another user with root equivalent privileges but there is nothing to stop you from doing so. I normally do an "# adduser someuser" then "# passwd someuser" which will add an entry for "someuser" in the /etc/passwd file and create a home directory in /home/someuser. You could add that user to the root group by using the "usermod -G root someuser" or edit the /etc/group file directly and add ",someuser" at the end of the "root" group.

To make the user "truly" equivalent to root you would change it's UID to 0 in /etc/passwd. But again, I would be interested in finding out why you need to do this because I have never come across a reason to do so. It only decreases your system security when you do this.

[ December 02, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

Stryker

  • VIP
  • Member
  • ***
  • Posts: 1,258
  • Kudos: 41
Adding new user
« Reply #2 on: 3 December 2002, 05:45 »
quote:
Originally posted by void main:
But again, I would be interested in finding out why you need to do this because I have never come across a reason to do so. It only decreases your system security when you do this.

[ December 02, 2002: Message edited by: void main ]



Intresting how in windows xp they decided to have it default to administrator when adding a user (unless of course you are using "computer manager").


I've never been able to make another root-ish user, tried and failed. And the only reason I do want to do this is so that i can have a backup in case one gets fucked up. (sometimes i go to school and don't logout. my mom just assumes it's ok to do things).

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
Adding new user
« Reply #3 on: 3 December 2002, 05:46 »
ok, I don't know what happened, I forgot to edit /etc/shadow. What I did instead was:

# usermod -g 0 user

That's because the owner of a certain server wants to give me root priviliges, but is reluctant on giving me his root pass. I know, I know.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Adding new user
« Reply #4 on: 3 December 2002, 06:07 »
quote:
Originally posted by Stryker:
Intresting how in windows xp they decided to have it default to administrator when adding a user (unless of course you are using "computer manager").


And that just proves that Microsoft has no concept of computer security.

   
quote:
I've never been able to make another root-ish user, tried and failed. And the only reason I do want to do this is so that i can have a backup in case one gets fucked up. (sometimes i go to school and don't logout. my mom just assumes it's ok to do things).


The only thing that makes "root" root is the fact that it has a UID of "0". As I said if you change the UID to 0 on another user account they will in effect be "root". But now your system is half as secure as it was before because you have two users with root privileges.

# adduser root2
# passwd root2
# vi /etc/passwd

change the UID and GID to "0" and you will have two root accounts. Do an "su - root2" and you will see a # rather than a $ indicating you are root.

Again, I would not suggest this. If he doesn't want you to have root's password (also cutting his security in half) then he can "sudo" certain processes you need to run as if you were root.

[ December 02, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
Adding new user
« Reply #5 on: 3 December 2002, 06:22 »
quote:
Originally posted by void main:
If he doesn't want you to have root's password (also cutting his security in half) then he can "sudo" certain processes you need to run as if you were root.

[ December 02, 2002: Message edited by: void main ]



Meh, thanks - that's exactly what I'm doing. . .