Crontab in OpenSuse 10.2

Crontab in my opinion is a job scheduler, with crontab you can make some program at a specified time that you define. Now lets just started with the configuration. To know if the user that you’re using is allowed to make a crontab you must check if your user is in /etc/crontab.deny then you cannot make a crontab job.

There are several option in crontab command

crontab -e #this will enable you to make or edit your crontab job

crontab -l #this will show you the current crontab job

crontab -r #this will remove your crontab jobs

When you’re editing crontab, here is some of the syntax that will be used

* * * * * command to be executed
– – – – –
| | | | |
| | | | +—– day of week (0 – 6) (Sunday=0)
| | | +——- month (1 – 12)
| | +——— day of month (1 – 31)
| +———– hour (0 – 23)
+————- min (0 – 59)

Lets see some of the example:

  • 30 4 * * 0 cp /home /backup

this means that every Sunday at 4.30 am, it will copy folder /home into /backup

  • 0 1 7 7 * /sbin/reboot

this means that in july 7th at 1.00 am, the computer will be rebooted

More in crontab you can make it to execute a file that contain several commands, like this one:

  • 15 4 * * 7 /home/admin/test.sh

inside /home/admin/test.sh

cd /home

find -name “*.mp3*” -print -exec /bin/rm -f ‘{}’ +

quotaoff -avug

quotacheck -avugm

quotaon -avug

repquota -a

this file will do; go to the home directory, find all the file that contain .mp3, print them, delete them, turn off the quota, check the quota, turn it on again, and give the summary of quota.

Init script in OpenSuse 10.2

The main aim of init script is to make the OS to execute the program that we wanted after a reboot or power on. You can do it in two ways wheter to make an init script or add some line in /etc/init.d/boot.local. If you want to do it with boot.local, which is simpler, you just need to append the required command into it. Continue reading

Kill User Session in Linux

This command will be useful if in case your user is doing something “naughty” and you want to kill them this is how you do it:

How to stop and halt (pause) the user

# skill -STOP -u username

How to continue the halted user

# skill -CONT -u username

How to Kill and make them logout from the computer

# skill -KILL -u username

How to kill all the user in the system

# skill -KILL -v /dev/pts/*

Hope this will be useful for some of you to who have some difficult time with the user.

Export Display in Unix

Export display is quite important for people that work in data center since it is impossible to put every server with a monitor, well actually you can do it with KVM switch, but then you still have to walk to get them. With this way you don’t have to do it, the requirement is only good network connection and strong computer to handle all the GUI 😀

In the case where your server doesn’t have any VGA card, so it’s impossible for you to plug in your monitor and all you can do is to connect by terminal server using COM port, you can try to export your Server’s Desktop into your desktop using export DISPLAY. This also will be useful if you employ a tight security option in your server, for example all of the port in your server is closed but port 22 or 23, then to make a remote desktop connection you can try this option.

Remote Desktop

Continue reading

LDAP Server (OpenLDAP) in OpenSuse 10.2

You might wonder what is LDAP, well in my opinion LDAP is a program that can manage all the user in our environment. One of the example is Windows Active Directory, with this you can make centralized login for all of your user, you also can manage how to define the rules for your user (like password policy). Too bad that you have to pay a lot of money to get this software, so the alterantive is by using OpenLDAP. Both Windows AD and OpenLDAP are a good LDAP server, but to configure LDAP is quite painful, you have to do it in konsole, but in OpenSuse 10.2 you can configure it with yast. Continue reading

Managing Disk Quota in OpenSuse 10.2

Hi all, once again I will post some stuff that makes your OpenSuse 10.2 become a very useful Server. This time I will give you how to manage the utilization of your hard disk usage by your user, in this case for your storage server. Sometime it really pain in the ass if one of our user put a lot of data in our very limited storage – like I did 😛 – so as an admin we should give some effort to limit their storage capacity. Continue reading

Multiple Subnet DHCP Server in OpenSuse 10.2

Hi all, long time not writing about IT stuffs, I’ve been a little busy lately :P. Anyway you might be wandering why my writing always about OpenSuse, well it because in my workplace they all use OpenSuse as primary OS (even for servers) for software development, of course there are some Windows PC, but it’s only about 30 %, and some using Solaris, so it’s a Unix world here 😀

About a month ago my boss asked me to replace the old machine that did all from proxy, DNS, DHCP, and Internet gateway. So in my plan I want to divide the machine into 2 machine one for DHCP and DNS while the other for proxy and internet gateway. For now I will discuss about DHCP server for multiple subnet. Continue reading

Modification in Samba Server – Mixing User and Share Level Security

As you know samba is used to share Linux machine, so that it can be visible when accessed by Windows machine (CMIIW), making Linux become a good File Server in a mixed network environment. Anyway as a file server we cannot just give the access to everyone to “see and access” all the folder inside it. I bet you still want to have some privacy for your self.

Authentication in Samba comes in several ways, but what we are focusing is on the mixing of share and user level security. In user level, the user need to input some credential BEFORE the user want to “see and access” what file available in that share. While in share level, the user can see all the file but then, the user need to put some credential if they want to access the file (each file or folder has different password) So what we want to do is to have user-level security on your Samba server, but we want Windows clients to be able to see a list of shares on the Samba server without authenticating, like a share level server.

Continue reading