Lingkage program

Hak akses root dengan sudo

Posted on: December 21, 2006

sudo : superuser do

– sudo dapat digunakan mungkin dengan tujuan keamanan jaringan atau server.
– mengizinkan user tertentu menggunakan hak akses setara root dengan menggunakan sudo.

Note :
– kita akan melakukan perizinan terhadap user “noc”
– masukan user “noc” kedalam group “wheel”

Ok sekarang kita mulai cara cepatnya :

1. login sebagai “root” lalu adduser “noc” terlebih dahulu dengan command :
[root@server root]#useradd -c “Network Administrator” -g wheel -d /home/cupid -s /bin/bash noc
[root@server root]#passwd noc
Changing password for user noc
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

atau bisa dengan menggunakan perintah
[root@server root]#adduser
lalu turuti perintah selanjutnya

2. edit file “/etc/sudoers” untuk menambahkan user yang berhak melakukan sudo.
[root@server root]#pico -w /etc/sudoers
—> #User privilege specification
root ALL=(ALL) ALL
test ALL=(ALL) ALL

3. Kemudian membatasi user yang dapat melakukan remote maka edit file “/etc/ssh/sshd_config”
[root@server root]#pico -w /etc/ssh/sshd_config
—> AllowUsers noc
AllowGroup wheel

[root@server root]#/etc/rc.d/rc.sshd restart

4. Ok sekarang coba masuk menggunakan user “noc” lalu lakukan command yang hanya bisa dijalankan root.
[root@server noc]$ sudo cat /etc/shadow


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


  • None
  • Order Xtrasize: Hi there, all is going well here and ofcourse every one is sharing facts, that's in fact fine, keep up writing.
  • chatroulette: I am curious to find out what blog system you're using? I'm experiencing some small security issues with my latest site and I would like to find s
  • 3:00 AM: Hello! Do you know if they make any plugins to protect against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any suggest


%d bloggers like this: