PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : Manage Wheel Group Users



mohammadt
November 4th, 2010, 13:46
Disable Direct Root Login.
This will force you to login as another user in (in cpanel the user must be in the wheel group), and then su to root. This helps to protect the server from 'wanna-be' hackers.
If you're using cPanel make sure you add a new user to the 'wheel' group so that you will be able to 'su -' to root, otherwise you may lock yourself out of root.
Set up anotheruser if you haven't already got one:
1. Type: groupadd newuser
2. Type: useradd newuserr -gnewuser
3. Type: passwd newuser passwordhere
On a CPanel system, you must add the new user to the wheel group via WHM "Manage Wheel Group Users".
After you have done this, you will have to login as newuser and then you will do 'su - root' to get to root.
Now copy and paste the following line to edit the necessary file for SSH logins
pico -w /etc/ssh/sshd_config
You should now be in the actual file - find the line
Protocol 2, 1
Uncomment this line and change it to look like this:
Protocol 2
As the next step find the line
PermitRootLogin yes
Uncomment that line and make it look like
PermitRootLogin no
Save and exit the file with Ctrl+X and then Y then enter
Now restart SSH
/etc/rc.d/init.d/sshd restart
From now on nobody will be able to login directly as root. To gain root access you will need to login as a different user and then switch to root.
--------
سلام. دوستان.
من یوزر رو تو Manage Wheel Group Users اضافه کردم. منتها نمیدونم پسوردش چیه ؟
فکر می کنم به اینها مرتبط بشه که نمیدونم کجا باید انجام بدم:

1. Type: groupadd newuser
2. Type: useradd newuserr -gnewuser
3. Type: passwd newuser passwordhere

ممنون میشم راهنمایی کنید.

mohammadt
November 4th, 2010, 17:22
دوستان کسی نیست راهنمایی کنه ؟ :)

persian.developer
November 4th, 2010, 17:37
Ssh رو باز کنید و انجام بدید

mohammadt
November 4th, 2010, 19:42
متاسفانه دسترسی به ssh رو از یکی از مراحل بالا PermitRootLogin no کردم و الان موندم همینجوری !!

---------- Post added at 06:42 PM ---------- Previous post was at 06:42 PM ----------

در واقع یک مرحله رو جلوتر انجام دادم که کار اشتباهی بوده!

persian.developer
November 4th, 2010, 20:34
سرور اختصاصی هست یا vps؟

mohammadt
November 4th, 2010, 20:35
vps

persian.developer
November 4th, 2010, 20:41
به مدیر سرور بگید که براتون انجام بده