Cara mengatur hak akses Root untuk pengguna baru

Setelah Anda masuk ke server Anda menggunakan pengguna baru, Anda masih dapat melakukan tugas root saja. Untuk melakukan itu cukup keluarkan perintah ini:

/usr/sbin/visudo

lalu cari baris/bagian bernama:

# User privilege specification
root    ALL=(ALL)       ALL

atau dalam rilis CentOS yang berbeda mungkin juga seperti ini:

## Allow root to run any commands anywhere
root    ALL=(ALL)        ALL

Kemudian tambahkan baris ini tepat setelah baris root:

## Allow root to run any commands anywhere
root      ALL=(ALL)        ALL
newuser   ALL=(ALL)        ALL

seharusnya terlihat seperti ini:

Bagaimana cara mengedit? Jika Anda belum menginstal editor Nano, cukup tekan "a" (tanpa tanda kutip). Setelah selesai menambahkan baris baru, cukup tekan tombol Esc untuk keluar dari mode pengeditan. Sekarang tekan tombol Shift + ZZ untuk menyimpan dan keluar dari editor vi.

Was this answer helpful?

Related Articles

How to turn off the VPS?

Please Login to Mikyhost = > Click VPS Package = > Click Shut Down thanks,

How do I turn on my VPS?

Please Login to Mikyhost = > Click VPS Package = > Click Power on   thanks,

How to Reset VPS Password?

Resetting password on VPS Package Please Login at Mikyhost = > Click VPS Package = > Click...

How to Restart VPS?

How do I restart the VPS? Please Login to Mikyhost => VPS PACKAGE => CLICK REBOOT

How to reinstall/rebuild VPS

Please enter the VPS Panel and click Rebuild and select the images to be reinstalled. thanks,