Permanently mounting a Windows share from Linux
If you're like most Linux users, you work in a mixed platform environment that likely includes Windows systems. Linux is quite capable of interacting with Windows systems and mounting Windows network shares on the fly. However, if you want to setup a particular Windows share to be always mounted at boot, here's a basic, generic tutorial. Keep in mind that this is a simple tutorial based on command line file editing that should work on most Linux systems. Please note that many Linux distributions have their own, often simpler, methods of performing this task so be sure to RTFM before using this method.
#Linux #Windows #SAMBA #CIFS #Networking
http://www.techrepublic.com/article/how-to-permanently-mount-a-windows-share-on-linux/
Wednesday, 29 June 2016
Sunday, 26 June 2016
Linux Terminal access via web browser
Linux Terminal access via web browser
This is a program that could really be handy for some folks, especially sysadmins who do a lot of remote administration.
http://www.tecmint.com/access-linux-server-terminal-in-web-browser-using-wetty/
This is a program that could really be handy for some folks, especially sysadmins who do a lot of remote administration.
http://www.tecmint.com/access-linux-server-terminal-in-web-browser-using-wetty/
Thursday, 16 June 2016
Linux sysadmin skills - too much time on your hands
Linux sysadmin skills - too much time on your hands
We don't often think about it, but having the correct time on our systems is critical. From small errors, to big fails, to security breaches, managing time securely is a critical sysadmin skill.
For years I've been in the habit of typing the following whenever I login to a system I'm working on. From a root prompt:
ntpdate -u pool.ntp.org
Actually, I usually use time.nrc.ca for servers in Canada and tick.usno.navy.mil for US systems but pool.ntp.org is a public time server pool that will work well for anyone, anywhere.
I follow that command with this one.
hwclock --systohc
(that's two dashes)
The first command reaches out to one of the official time servers on the Internet and uses it to set the local system clock to match. The -u just assures that it will work even if the system is already running a time daemon.
The second command takes the newly atomic clock accurate system clock time and stores it in the computer's hardware clock, assuring that they are in sync and that the system will still have an accurate clock upon reboot.
These two commands are something you can type into your system any time you want to update it's clock. It wouldn't hurt for regular home users to type them once a week.
Why not a script you ask? Good question. For two reasons.
The first reason is diagnostic. when you type the first command you'll get output like shown.
# ntpdate -u time.nrc.ca
16 Jun 14:53:21 ntpdate[16201]: adjust time server 132.246.11.238 offset 0.007741 sec
You can see that the command returns some information including the newly set time, the server IP used, and how far off your system clock was. In this case you can see that my clock was very close to correct, probably closer than the fine grained accuracy of the hardware clock. What this tells me is that my system is keeping time correctly and that there are likely no problems with the system timing or the hardware clock.
If there were an offset of minutes or more then you may want to start some system diagnostics, starting with your motherboard's CMOS battery.
The second reason not to put this into a script is that on most modern Linux/UNIX distributions, there is already a system in place to automate this. You'll need to look at using that system and this article is a start on how to do it securely.
Another thing that I do on most networks is to designate one or two servers as local time servers. The rest of the computers on the network use one of those two, setup as primary and backup, time servers to set their clocks. The reason for doing it this way it to be polite and reduce the load on the public time servers, and also to reduce your own network bandwidth usage and security risks.
The linked article covers using ntpd in more depth and with a focus on security as the ntp protocol is often a vector of attack.
#Linux #Unix #NTP #Time
http://www.linux-server-security.com/linux_servers_howtos/linux_ntp_time_servers.html
We don't often think about it, but having the correct time on our systems is critical. From small errors, to big fails, to security breaches, managing time securely is a critical sysadmin skill.
For years I've been in the habit of typing the following whenever I login to a system I'm working on. From a root prompt:
ntpdate -u pool.ntp.org
Actually, I usually use time.nrc.ca for servers in Canada and tick.usno.navy.mil for US systems but pool.ntp.org is a public time server pool that will work well for anyone, anywhere.
I follow that command with this one.
hwclock --systohc
(that's two dashes)
The first command reaches out to one of the official time servers on the Internet and uses it to set the local system clock to match. The -u just assures that it will work even if the system is already running a time daemon.
The second command takes the newly atomic clock accurate system clock time and stores it in the computer's hardware clock, assuring that they are in sync and that the system will still have an accurate clock upon reboot.
These two commands are something you can type into your system any time you want to update it's clock. It wouldn't hurt for regular home users to type them once a week.
Why not a script you ask? Good question. For two reasons.
The first reason is diagnostic. when you type the first command you'll get output like shown.
# ntpdate -u time.nrc.ca
16 Jun 14:53:21 ntpdate[16201]: adjust time server 132.246.11.238 offset 0.007741 sec
You can see that the command returns some information including the newly set time, the server IP used, and how far off your system clock was. In this case you can see that my clock was very close to correct, probably closer than the fine grained accuracy of the hardware clock. What this tells me is that my system is keeping time correctly and that there are likely no problems with the system timing or the hardware clock.
If there were an offset of minutes or more then you may want to start some system diagnostics, starting with your motherboard's CMOS battery.
The second reason not to put this into a script is that on most modern Linux/UNIX distributions, there is already a system in place to automate this. You'll need to look at using that system and this article is a start on how to do it securely.
Another thing that I do on most networks is to designate one or two servers as local time servers. The rest of the computers on the network use one of those two, setup as primary and backup, time servers to set their clocks. The reason for doing it this way it to be polite and reduce the load on the public time servers, and also to reduce your own network bandwidth usage and security risks.
The linked article covers using ntpd in more depth and with a focus on security as the ntp protocol is often a vector of attack.
#Linux #Unix #NTP #Time
http://www.linux-server-security.com/linux_servers_howtos/linux_ntp_time_servers.html
Learning Linux -Make your own motion detecting security camera with "motion"
Learning Linux -Make your own motion detecting security camera with "motion"
I've covered motion before, but it's a powerful and complex piece of software so configuring it can be confusing at first. Plus there are many different ways to use it so I'm happy to link any tutorials I find.
Motion is simply software motion detection that can turn any Linux supported webcam into a sophisticated security system. Configuring it properly will lead to optimal results with better detection and fewer false positives.
This article is geared toward Ubuntu but it will be similar for any Linux without training wheels too.
#Linux #Security #MotionDetection #Webcam
https://www.howtoforge.com/tutorial/motion-detection-on-linux/
I've covered motion before, but it's a powerful and complex piece of software so configuring it can be confusing at first. Plus there are many different ways to use it so I'm happy to link any tutorials I find.
Motion is simply software motion detection that can turn any Linux supported webcam into a sophisticated security system. Configuring it properly will lead to optimal results with better detection and fewer false positives.
This article is geared toward Ubuntu but it will be similar for any Linux without training wheels too.
#Linux #Security #MotionDetection #Webcam
https://www.howtoforge.com/tutorial/motion-detection-on-linux/
Learning Linux - Make your servers more resilient with monit
Learning Linux - Make your servers more resilient with monit
Sometimes server services stop, crash, or hang and you can't be around 24/7 to monitor them, but monit can. Hence the name.
With monit you can setup a watchdog service to monitor the goings on of your Linux system and customize the reaction to each individual monitored service, file, port, etc. From logging it, to restarting it, to notifying you or all the above, monit can do it.
The article's instructions are geared towards Debian, but OpenSUSE users can install very simply by typing the following in a root shell.
zypper in monit
Enjoy.
#Linux #Sysadmin
http://www.linux-server-security.com/linux_servers_howtos/linux_monitor_services_monit.html
Sometimes server services stop, crash, or hang and you can't be around 24/7 to monitor them, but monit can. Hence the name.
With monit you can setup a watchdog service to monitor the goings on of your Linux system and customize the reaction to each individual monitored service, file, port, etc. From logging it, to restarting it, to notifying you or all the above, monit can do it.
The article's instructions are geared towards Debian, but OpenSUSE users can install very simply by typing the following in a root shell.
zypper in monit
Enjoy.
#Linux #Sysadmin
http://www.linux-server-security.com/linux_servers_howtos/linux_monitor_services_monit.html
Monday, 13 June 2016
Learning Linux - master rsync by starting with these examples
Learning Linux - master rsync by starting with these examples
For backups and copying multiple files, especially over networks or to backup media, rsync is an essential tool for Linux users to master.
Personally I use it every day to move clumps of files around the network, and I have scripts on systems all over the planet using rsync to do backups. It's a powerful and efficient tool that's an essential part of any sysadmin or Linux user's tool kit.
Like most things, rsync is easiest to learn by seeing some examples and expanding your knowledge from there as necessary.
http://www.librebyte.net/en/gnulinux/14-practical-examples-of-the-rsync-command/
For backups and copying multiple files, especially over networks or to backup media, rsync is an essential tool for Linux users to master.
Personally I use it every day to move clumps of files around the network, and I have scripts on systems all over the planet using rsync to do backups. It's a powerful and efficient tool that's an essential part of any sysadmin or Linux user's tool kit.
Like most things, rsync is easiest to learn by seeing some examples and expanding your knowledge from there as necessary.
http://www.librebyte.net/en/gnulinux/14-practical-examples-of-the-rsync-command/
Monday, 6 June 2016
Learning Linux - monitoring long running processes with pv
Learning Linux - monitoring long running processes with pv
Some things just take time. Even on modern computers with ever faster processors and storage systems, things still take time. It's easy to start a long running process and then mistakenly CTRL-C out of it, thinking it has died or locked up. Of course the more important that task, the higher the odds you'll do this. Murphy's law. However, for many processes you can reduce the chances of doing this by using the pv command to give you feedback where none normally exists. This is especially useful for really long running processes. For example backing up over a slow WAN link.
Another thing to consider is that many classic UNIX commands have been upgraded on Linux to add features including status output. For example, rsync has a progress indicator option to give you some feedback on it's status during a copy.
#Linux
http://www.tecmint.com/monitor-copy-backup-tar-progress-in-linux-using-pv-command/
Some things just take time. Even on modern computers with ever faster processors and storage systems, things still take time. It's easy to start a long running process and then mistakenly CTRL-C out of it, thinking it has died or locked up. Of course the more important that task, the higher the odds you'll do this. Murphy's law. However, for many processes you can reduce the chances of doing this by using the pv command to give you feedback where none normally exists. This is especially useful for really long running processes. For example backing up over a slow WAN link.
Another thing to consider is that many classic UNIX commands have been upgraded on Linux to add features including status output. For example, rsync has a progress indicator option to give you some feedback on it's status during a copy.
#Linux
http://www.tecmint.com/monitor-copy-backup-tar-progress-in-linux-using-pv-command/
Sunday, 5 June 2016
Linux for beginners - Storage information gathering
Linux for beginners - Storage information gathering
Linux is always about power and choice. There's usually multiple ways to do any given task. It's up to you to explore them and decide which ones work best for you.
For example, when it comes down to gathering technical information on your installed storage devices, Linux can give you a much greater breadth and depth of information than most other operating systems.
Here's a breakdown of some of the many tools available to help you do that.
#Linux
http://www.cyberciti.biz/faq/find-hard-disk-hardware-specs-on-linux/
Linux is always about power and choice. There's usually multiple ways to do any given task. It's up to you to explore them and decide which ones work best for you.
For example, when it comes down to gathering technical information on your installed storage devices, Linux can give you a much greater breadth and depth of information than most other operating systems.
Here's a breakdown of some of the many tools available to help you do that.
#Linux
http://www.cyberciti.biz/faq/find-hard-disk-hardware-specs-on-linux/