Wednesday, February 22, 2012

How to create user in UNIX

October 27, 2011

I stumbled upon this problem when I was helping my friend to setup Apache server on Red Hat. Let us learn a few things about UNIX user access first.

Access control list in UNIX was first introduced by Hewlett Packard (my current employer) via its product, HP-UX. User access control is defined as a list of permissions attached to an object. In our context here, an object is a user or a group of user. In UNIX, there are Groups and Users associated to one or more groups. As a Root user, we can assign permission to a Group.

But but, what is a ROOT???

Alright, Root is a group with absolute control to the system. Root is also a default user for a UNIX system. When you installed a UNIX-based operating system, they will automatically create a root user and you can use this user to create another user or perform any administrative tasks. Most of UNIX-based operating system nowadays is disabling their root user due to security concern. Example of UNIX-based operating system with root-disabled is Ubuntu. As a root user, you can modified system files, create user, adding group, etc. So, be absolute careful when dealing with root user.

Next is I want to show you how to create a group and user. To create a group is pretty simple. You just run this command:


trick utk elak gna localhost atau 127.0.0.1

Sblm tdo, aku nk bg tips dlu. kalo korang bwat sistem brasaskn web, msti korang kne testing kt local pc korang kn. slalunya kte gna localhost atau 127.0.0.1. tp arini aku nk bg trick utk mmbolehkn kte customizekn localhost tu. eg mcm peja.server.com ke, www.facebook.com ke. trick ni boleh jgk dgunakan utk steal password org laen.

snang je, first skali korang kne locate fail 'host'. biasanya fail host ni ada dlm folder windows/system32/drivers/etc/. dah jmpa fail tu, korang edit gna textpad or notepad or ape2 la yg ade. file ni sbnrnya mmbolehkn pc korang retrieve dns scara local sbb file ni akan drujuk oleh pc utk cari ip. kalu xjmpa dlm file ni, pc akan send request pd dns server.

mende ni agak bahaya sbb org boleh phishing mana2 website utk dptkn password korang. sbg contohnya: