ش | ی | د | س | چ | پ | ج |
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
سلام،
بعضی از ادمین ها علاقه دارند به منظور رعایت مسائل امنیتی، History ترمینال لینوکس رو غیر فعال کنند تا سایر کاربران سرور دستوراتی که اونا تایپ کردن رو نتونن ببینن. برای اینکار 2 تا روش خیلی ساده وجود داره:
[iman@kali ~]$ nano .bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binHISTSIZE=0.bash_profile (END)export PATH
[iman@kali ~]$ source .bash_profile
If you forgot your root password for your debian server use the following procedure to reset.
Boot to the GRUB menu. Then, press <e> (for edit) before Linux has a chance to boot.
Using your keyboard arrow keys, move the cursor down a line or so, and press <e> (for edit) again, you should now be on the kernel line, and press <End> to go out to the very end of that line. Now hit the spacebar once, if necessary, to add a space, and then add one of the folllowing:
init=/bin/bash
or
init=/bin/sh
Then press <Enter>, and you're back at the kernel line, press <b> (for boot) and the computer will proceed to boot to a root prompt.
At this point, the root file system is still mounted read-only, so enter the following command:
mount -n -o remount,rw /
Then type:
passwd
Enter your new password. Retype if asked to confirm.
Then restart the machine by typing:
reboot
Now you should be able to login with your new root password as required.
To keep the Static Route persistent on Linux or you want to add the route entries to the network
script files (not using the route command) then all you need to do is to edit the file
/etc/network/interfaces
and the static routes in the following format:
up route add [-net|-host] <host/net>/<mask> gw <host/IP> dev <Interface>
Example
up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth1
And the file will like the following
sudo cat /etc/network/interfaces
The output should show something like this
sudo cat /etc/network/interfaces
The output should show something like this
The above has 2 Ethernet interfaces and the static route is added to the interface eth1.
For the change to /etc/network/interface to take effect. please restart the "networking" service as follows:
sudo /etc/init.d/networking restart
NOTE: If you added the route already using the "route" then there is no need to restart the networking service because, the next time server is restarted this takes effect.
Linux Debian - Set Time Zone
جهت تنظیم Time Zone بر روی سرور لینوکس Debian از دستور زیر استفاده می شود:
dpkg-reconfigure tzdata
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 |
127.0.0.1 localhost.localdomain localhost 192.168.0.100 server1.example.com server1 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts |