Yes! It is not a big deal to add multiple accounts by using Bash Shell.
We can do it by:
#for x in aaa bbb ccc;do useradd $x; done
This command will add three users accounts : aaa, bbb, and ccc with no password.
What is your next move? Assigning password to each user by:
#passwd aaa
#passwd bbb
#passwd ccc
Three accounts is ok. How about adding 50 accounts? Will you repeat the same procedure to assign password for each account? It will be a time-consuming job. Here is the solution:
As you see, it will create three user accounts with default password "password"
My Motto - "Be Lazy In Outstanding Ways"
Some of my experiences related to Opensources such as Linux, Python programming, Bash Shell Scripting.....
Thursday, August 12, 2010
Monday, August 9, 2010
The Poorest Solutions To Send sms To Mobiles From Linux Box !
"HEY! Netlynker! We don't have a extra handset like you. So how?"
I have already expected this question. Fortunately for people in Singapore, Starhub, Singtel and M1 provide web 2 sms service so that you can use internet to send sms to mobile phones. But there is one catch: we can only send sms via web interface and they don't provide API for you.So you must find a way to weaponize these services for Linux Box. How? Honestly, I also don't know how to do it. :P
But I do know how to make use of the things that other people have created.A gentleman called Zhi Xiong created the bash shell scripts for these three Mobile Operators. Because of his work, I can copy it without exhausting my brain.( Even if I do, it will be useless. :) )
Here are his works.
Ok! Now you can also make use of it,exploit it or whatever..You can also show off to your friends in the night club.
"Folks! All of my servers are down and sending sms to me. How capable I am! " :D
PS: All Credits and Complaints will go to him: Zhi Xiong
I have already expected this question. Fortunately for people in Singapore, Starhub, Singtel and M1 provide web 2 sms service so that you can use internet to send sms to mobile phones. But there is one catch: we can only send sms via web interface and they don't provide API for you.So you must find a way to weaponize these services for Linux Box. How? Honestly, I also don't know how to do it. :P
But I do know how to make use of the things that other people have created.A gentleman called Zhi Xiong created the bash shell scripts for these three Mobile Operators. Because of his work, I can copy it without exhausting my brain.( Even if I do, it will be useless. :) )
Here are his works.
Ok! Now you can also make use of it,exploit it or whatever..You can also show off to your friends in the night club.
"Folks! All of my servers are down and sending sms to me. How capable I am! " :D
PS: All Credits and Complaints will go to him: Zhi Xiong
Wednesday, August 4, 2010
Sending SMS from Linux Box to My Mobile.
- Handset == Nokia 6300 with usb cable
- OS == Ubuntu 9.10 (upgraded from 9.04)
- Goal == To test whether Linux Box can send sms alerts to any mobile numbers.
- Software == gammu (opensource gsm software for *nix platform)
#apt-get install gammu
To Configure -
#gammu-config
port = /dev/ttyACM0 #your port may differ from me depending on your ph model and cable.
model = nokia autodetection
It will save a .gammurc config file in your home directory
#gammu --identify # it will list your connected mobile devices , In my case Nokia 6300.
To test sms to any phone -
#gammu sendsms text +659457xxxx
Enter message text and press ^D:
I love opensource!!
Sending SMS 1/1....waiting for network answer..OK, message reference=2
People may say "Hey guy. Why do you want to sms from Linux box while you can directly send from mobile phone?" As A System Admin, sometimes we need a way to know critical events of our servers on the spot. For example, we can configure gammu with Nagios Monitoring Server so that it will sms to my mobile whenever a network service is down. Cool? Or Annoying?
Subscribe to:
Posts (Atom)
