Example ldif file
dn: ou=People,dc=example,dc=com
objectClass: organizationalUnit
ou: People
dn: ou=Groups,dc=example,dc=com
objectClass: organizationalUnit
ou: Groups
dn: cn=Artist,ou=Groups,dc=example,dc=com
objectClass: posixGroup
cn: SUBGROUP
gidNumber: 5000
dn: uid=ben,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: ben
sn: Affleck
givenName: Ben
cn: Ben Affleck
displayName: Ben
uidNumber: 10001
gidNumber: 5000
userPassword: benspassword
gecos: Ben Affleck
loginShell: /bin/bash
homeDirectory: USERDIRECTORY1
dn: uid=bob,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: bob
sn: Marley
givenName: Bob
cn: Bob Marley
displayName: Bob
uidNumber: 10002
gidNumber: 5000
userPassword: bobspassword
gecos: Bob Marley
loginShell: /bin/bash
homeDirectory: USERDIRECTORY2
Create a new file base.ldif with the above information.
We need to use…
Nowadays, self-driving car is becoming more and more common. Big company like Tesla is making self-driving car to become realistic. To collect data so that auto car can learn and adapt in real world, we need to handle a lot of bag files.
A bag is a file format in ROS for storing ROS message data. Bags — so named because of their .bag extension — have an important role in ROS, and a variety of tools have been written to allow you to store, process, analyze, and visualize them.
A sample ROS bag file can get from http://realsense-hw-public.s3.amazonaws.com/rs-tests/TestData/stairs.bag.
Each data structure has associated costs and benefits. In practice, it is hardly ever
true that one data structure is better than another for use in all situations. If one
data structure or algorithm is superior to another in all respects, the inferior one
will usually have long been forgotten.
In computing, a hash table (hash map) is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index, also called a hash code, into an array of buckets or slots…
The configuration for this is in the file $HOME/.ssh/config
Add this to the file
Host *
ServerAliveInterval 100
which will make the client send signal to the ssh server every…
Recently I met an issue that my shell script does not run in crontab. But when I run them directly it works. For example consider this bash:
#!/usr/bin/env bash
aws ec2 stop-instances --instance-ids i-0cebb331ce02934a i-08c55f40aadfa64e i-09aeaec43de5e67e i-09a63f61a682f8d9 i-049cfae6dd25b799
Works perfectly fine when run
./stop-instances.sh
But when add them to the crontab with crontab -e, it does not work
39 14 * * * /home/cuongld/Tools/aws-scripts/stop-instances.sh
45 13 * * * /home/cuongld/Tools/aws-scripts/start-instances.sh
The problem lies in this:
Because the environment when crontab runs, is different when we run them directly.
So what we need to do is try to make the crontab…
A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.