RSS
 

Using Linux Shell to Add a User

12 Jan

Hiya all. As I continued to work with my remote server’s shell, a new issue arose. I needed to add a new user to my system.

So, suppose that you want to add Mr. Friend to your system via bash:

useradd mrfriend

Okay, now you need to set a password for our friend:

passwd mrfriend

You will be prompted to enter the password and confirm it.

However, to do all this you need to be root. To do so, before entering any of these, type:

su -

Don’t forget the “-“, because otherwise you will get a “command not found” when you issue “useradd”.

Note: On some systems the command is “adduser” instead of “useradd”.

 

Twitting

08 Jan

Hey there people of the world. I’ve today started to officially twit. I was a member, of course, but up to this point, hadn’t had twitted any.

Well, there I go: @mmnaseri

 
1 Comment

Posted in Myself

 

Kill users in Linux shell

08 Jan

Okay, first off, this is not a tutorial to show you how to kill your nemesis. For that, you need to take shooting lessons (or maybe, learn how to mix poisons).

Killing here means logging out a user. This can be particularly useful if somebody has logged into your PC whom you don’t want to have access. Or whom you simply don’t like.

For instance, if you are managing a server, and a particular user is eating up all the bandwidth and also won’t listen to reason, you can just log him out. Simple as that.

There’s a good set of utilities called “procps” which might come handy. It contains a tool called “skill” which helps you send signals and such to users and other active (or inactive) processes.

Okay, enough talk. Let’s send some cool signals.

The syntax of the skill command looks like this:

skill -SIGNAL -u USERNAME

There are a possible number of signals you can send. And obviously, you will be sending those signals to the user with username “USERNAME”.

Signals to send to users

You can send these different signals to users:

  • stop; which means you want that user’s activities to be halted. It’s like pushing the “Pause” button on a video set.
  • cont; is the resume button, whereas “stop” was the pause. You can use “cont” to allow the user to continue with his/her activities.
  • kill; now, this sounds like something the Dark Lord would have loved. You send the “kill” signal, the user’s session ends.

Example: Logging out “mr-enemy”

Okay, suppose your enemy – with the convenient user name “mr-enemy” – has logged into your system, and you want to log him out, just to spite him.

Here’s what you do:

skill -kill -u mr-enemy


Easy, no? You can also halt his session to irk him some more:

skill -stop -u mr-enemy

More Information

One thing to note, is that to stop a user you have to be “root”. More information on the skill command can be found by typing into your shell:

man skill

There, you will (probably) see that it is a deprecated command. However, I myself couldn’t find a replacement.

Other useful commands from the procps package include: top, kill, w, free, and vmstat.

Tired of your life?

No problem, you can even commit suicide with Linux shell:

skillkill –u [yourusername]

where [yourusername] is replaced with your user name (surprise!).

Note: NEVER kill the “root” if you don’t want to cold reboot your system!

 

eyeOS 2.0: A First Look

03 Jan

Well, it’s not here yet, but what I’ve seen is pretty smooth. I think the eyeOS GUI designers are well into their business. What I’ve seen so far from the mock-ups and videos and images suggests a big facelift in the upcoming eyeOS major release.

I think you will agree with me when you see the video.

Read the rest of this entry »

 

eyeOS: eyeMail

03 Jan

Okay, it seems like I’m not gonna be able to run eyeMail on my server. After a couple of Google searches, I found out that there could be two things preventing eyeMail from functioning correctly.

One was the MBString PHP module, which as I’ve previously mentioned, I’ve gone through pains to install. The other was the SQLite extension. Well, I tried everything and it seemed to be doing well. But as I searched some more, I realized that my PHP was compiled with PDO-SQLite. But, eyeMail requires the SQLite extention, not the PDO-SQLite.

So, I’ll only be able to run eyeMail on my server if I recompile PHP without the “—without-sqlite” option. Right now, it’s not that important to me, so I’m gonna let it pass.

 

eyeOS 1.9

01 Jan

Today, I installed eyeOS 1.9 on my virtual host. It was more than good, in my opinion. However, the installation didn’t go as smoothly as I thought it would. I mean, the 1.8 worked better for me.

First, I had to uninstall and reinstall Kloxo, PHP, MySQL, Apache, and PEAR several times before getting them to work properly together. I know this wasn’t directly related to the eyeOS installation, but I had to do this because eyeOS (or rather, PHP) didn’t recognize the SQLite and MBString modules I had installed.

Then I had to surf the web for about one hour to find out that I couldn’t see any applications in the package manager, because the default repository address wasn’t working. So, I had to switch the repository to 1.7.

And besides everything, I still haven’t got the IMAP mail client to function properly.

I’ll post as soon as I get that problem solved.

 
 

A Dream Come True

27 Dec

We all have many dreams, most of which we deem unreachable. But many of those “unreachable” dreams are just a little further down the way, waiting for us to put some effort in it. I’ve found an excellent video depicting just such a thing.

Read the rest of this entry »

 
No Comments

Posted in Review

 

Merry Christmas

26 Dec

A very merry Christmas to all those who read this. As I’m a Muslim, Christmas doesn’t hold much value for me, but, also, in a very coincidental way, this year, the start of Islamic Year which is the beginning of Muharram has come very close to the Christmas. However, as an Iranian, that date also doesn’t hold much value for me.

In Iran, it is Nowruz which we hold dear and celebrate. Nowruz, which literally means The New Day, is a time of celebration which starts by the first day of spring, namely, MArch 21st.

Well, I’m today here to say happy Christmas to all Christians all over the world.

 
No Comments

Posted in Myself

 

My Technorati Claim

25 Dec

Okay, that was fast. Technorati evaluated my blog and told me to put this unique “claim ID” in a new post, to show that this blog is indeed where I write: “2RQ4XA7A32AX”

Now, I’m gonna see what’s next after pushing the big, old, “Verify Claim Token” button.

 
No Comments

Posted in Myself

 

Technorati Membership

25 Dec

Technorati is a place in which you can share your blog with the world and make the world be aware of what you write. I was reading the MSDN Blogs feed and stumbled upon this blog by Seth Eliot, which mentioned becoming a member, and I thought why shouldn’t I also do that?

So, I started a user and filled in a new claim, and I’m currently waiting for them to give me further instructions after an evaluation of my blog.

 
No Comments

Posted in Myself