NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

ساخت کاربر جدید

در اینجا منظور از کاربر و حساب کاربری یکی است. برای ساخت یک کاربر جدید، با حساب ریشه وارد محیط خط فرمان لینوکس شوید و دستور زیر را بزنید. دقت داشته باشید که به جای newuser یک نام کاربریِ جدید برای این حساب کاربری را باید وارد کنید.

/usr/sbin/adduser newuser
حالا از دستور passwd به همراه نام کاربریِ کاربر جدید استفاده می‌کنیم، تا برای کاربر جدید یک رمز عبور تعیین کنیم. فکر کنم راجع به این دستور در آموزش قبلی توضیحات کامل ارائه شد.

passwd newuser
تخصیص امتیازهای کاربر ریشه به حساب کاربری جدید

این کاربری که تا اینجا ساختیم و برای آن رمزی را تعیین کردیم، امکان اجرای دستورات حساس و مهم را ندارد. فقط می‌تواند مثل یک کاربر عادی اقدام به استفاده از منابع محدود خود کند. برای اینکه به مانند کاربر ریشه بتوانیم از آن استفاده کنیم، باید امتیازهای کاربر ریشه را هم به آن اختصاص دهیم.

دستور زیر را برای باز کردن پروندۀ visudo بزنید. اگر ویرایشگر nano را روی سرور نصب کرده باشید، به راحتی می‌توانید از قواعد ویرایشگر nano برای ویرایش این پرونده استفاده کنید. در غیر این صورت ویرایشگر vi یا vim باز شده که برای ویرایش پرونده درون این ویرایشگر باید قواعد استفاده از آن را یاد داشته باشید. a را از صفحه کلید زده تا وارد محیط ویرایشی شوید. پس از اتمام ویرایش هم Esc را زده و سپس Shift را گرفته و دو بار Z را از صفحه کلید بزنید.

/usr/sbin/visudo
به دنبال بخشی بگردید که حاوی خطوط زیر است:

# User privilege specification
root ALL=(ALL) ALL
در برخی از نسخه‌های CentOS به این صورت است:

## Allow root to run any commands anywhere
root ALL=(ALL) ALL
به هر حال، پس از خط دوم شما باید خط دیگری به مانند خط سوم کد زیر به این پرونده اضافه کنید. به جای newuser شما باید نام کاربری که جدیداً ساختید را بنویسید.

## Allow root to run any commands anywhere
root ALL=(ALL) ALL
newuser ALL=(ALL) ALL
همین الان می‌توانید با دستور logout از حساب فعلی خارج شده و با حساب کاربریِ جدید وارد سرور شوید. این بود از طریقۀ ساخت کاربر جدید در سرور لینوکس و همچنین اعطای دسترسی‌های ریشه به کاربر جدید. تا اینجای کار را داشته باشید تا در آموزش بعدی طریقۀ تغییر درگاه یا پورت SSH و همچنین بستن امکان ورود به سرور از طریق حساب root را بررسی کنیم.
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.