Home / Software / BSD, Linux, and Unix / Creating user similar to root
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Creating user similar to root  (Read 1073 times)
TAC
Guest
« on: July 20, 2005, 06:59:12 AM »

How will anybody create a user in UNIX with privilage and environment similar to 'root'?

Regards,
TAC
IP logged
ldslourdes
Guest
« Reply #1 on: August 07, 2006, 01:25:00 PM »

The following is for Linux. It may or may not work for Unix. Try it and see.

Method #1: if user already created
syntax:
Step 1. Type     vi /etc/passwd
Step 2. Scroll down to username and change the following to a 0 (zero):

username:x:uid:gid::/etc/home:/bin/bash

Step 3. Hit the ESC button, then hit the key combination Shift:, then type wq!, then hit the enter button.

[size=18]"Note"[/size]
Be careful. If you make a mistake, just hit the ESC button, then hit the key combination Shift:, then type q!, then hit the enter button. Then begin at step 1 again.
 

Method #2: if user not yet created
syntax:
adduser -o -u 0 username
the letter o is for override and the number 0 is to set the uid to zero like the root's uid(user id).
« Last Edit: August 07, 2006, 01:26:38 PM by ldslourdes » IP logged
Rob Pomeroy
Prodigy



Thanked: 119
Posts: 6,454

Experience: Expert
OS: Other


Web/Networking/Linux

Me
« Reply #2 on: August 07, 2006, 03:14:53 PM »

Note to the unwary: don't EVER do this.  :)
IP logged

Author of the fantasy thriller, Insensate - available for all ebook readers and iDevices. Find out more >here<. Only 99p/99¢!
Pages: [1] - (Top) Print 
Home / Software / BSD, Linux, and Unix / Creating user similar to root « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.121 seconds with 20 queries.