Thursday, June 16, 2011

Moving Buttons from left to right in Ubuntu

Ubuntu now default comes with mac style layout with minimize, maximize and close buttons on the left side and it is a problem for some as they don't like this layout. So we can change them from left to right using simple steps.

Step1:-
Press Alt+F2 to open the "Run Application" Dialog box.
In that, enter gconf-editor and press enter.


Step2:-
Now a window will come up having a list of options. From that, choose Apps and expand the dropdown.
Now from the dropdown list, goto "Metacity" and then click on "general" submenu in it.
Now on right hand side, you will get the list of many options. From that, select "Button_layout".
Double click on it and change its value to "menu:minimize,maximize,close"
Now click ok.

You will see that now the buttons are placed to the right of the opened windows or applications.

Thanks for reading the post.

Monday, June 13, 2011

Add and remove users by command prompt.....

While doing our project, we came to a position where we needed to have abt 40-50 users in SAM database and to add them using GUI would be a very lengthy process.

So we decided to use command prompt.

All you have to do is to create a .BAT file and add the following command to it.

net user (username) (password) /add /comment:"Test user, DELETE ME"
net user Rahul abcd /add /comment:"Test user, DELETE ME"

So, add the user names and passwords below one by one and run the bat file. All will be added.

To remove them, again create a .bat file and use this command.

net user Rahul /delete

So, we just created the file, added 20-30 lines with username and password and got them added to database.

INTERESTING POINT:-
You can also create a prank with them.
1. Just create the bat file with 30-40 user list to be added.
2. Name it like game.bat or some other name so that other user clicks on it.
If he will click, all the accounts will be created on his computer. And you know the password as well.....

It will lead to so many accounts appearing at the time of login and will take a lot of time showing the login screen.

For removing them, you need to provide him the simple remove.bat file with remove command for all users and he can successfully remove all the user accounts.

Thanks for reading the post.... :)