10/22/2008

HOW TO CREATE USER IN LINUX

The first time I knew about Linux, I said in my mind..."Shit this OS is really sucks and I don't know how to login into the server" even when my bozz gave me a root access...hahahaha what a shame!!my bozz said to me to create a user/super user for myself and I tried to googling about it because I'm a newbie. finally, I found a simple way to create a super user. Here's my explanation from my expirience hehehehe :
**First of all you add the user**
[root@rebel ~]# useradd newbie
**add the password for the user**
[root@rebel ~]# passwd newbie
Changing password for user newbie.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
**type visudo to manage the user's login**
[root@rebel etc]# visudo
**edit some configuration in here, for ex : newbis user added in this section**
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
newbie ALL=(ALL) ALL
noc ALL=(ALL) ALL
**edit some configuration in here, for ex : newbis user added in this section**
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
newbie ALL=(ALL) NOPASSWD: ALL
noc ALL=(ALL) NOPASSWD: ALL
**save setting**
press ESC button and type :wq! then press Enter.
**Try Login**
login as: newbie
newbie@192.168.3.127's password:
Last login: Thu Oct 23 04:08:47 2008 from 192.168.3.107
[newbie@rebel ~]$ sudo su -
[root@rebel ~]#
see!!! you just need to type sudo su - you can login as super user and you don't have to type the password twice hehehehehe, btw you can modify everything in visudo as an user management tools. That's my simple knowledge and I hope it's usefull for you guys...Bye and see ya in the next posting...(SiMoNRoOTs)

1 comment: