Wednesday, February 1, 2012

Users and Groups in Linux - 1

Users :
Linux is Multi user environment. The users are those who can access the operating system resources with proper permissions as defined already.

Types of users :
I.   System Users
II.  Root User
III. Normal Users

I. System Users - They are default user in linux for some system process and service.
II. Root User - Root user is administrator of Linux System. He have all rights in machine. So should be very carefully with root user. Unknown mistakes may crash the system.
III. Normal Users - They are created by us for some reasons. They are limited users.

Groups : 
Groups are Logical experiences for tying users together. Normally groups are used to share files and permissions.

Types of groups :
I.   System Groups
II.  Root Group
III. Normal Groups

I.   System Groups - They are default groups in linux for some system process and services.
II.  Root Group - Root group is administrator group of Linux System.
III. Normal Groups - They are created by us for some reasons. They are limited groups.

Create User :
Normally we won't and can't create System users, It'll be created by system and or applications for services and maintainable. Root user will be created at the time of Linux installation.
for create a normal user we'll use the command "adduser".
We can use adduser command with root user only.

"useradd" command used to create a user. 
"passwd" command used to create password for user.

Ex.
[root@server ~]# useradd user1
[root@server ~]# passwd user1
user1

* Typed password won't be shown at terminal window
** Won't ask for password conformation for second time with root. (re enter password)

Create Group :
It also same as user. But When we create a user, the group for the user will be created with same name. A user must be with in a group. Two basic classifications in groups.

i   Primary Group
ii  Secondary Group

Primary Group - The user should be created with this group. He have all rights with in this group.
Secondary Group - The user may or may not have secondary group. And he may or may not have full rights with in this group.

"groupadd" command used to create a group.
Ex.
[root@server ~]# groupadd group1

User ID & Group ID
UID stored in /etc/passwd
GID stored in /etc/group

UID and GID are unique number for users and groups.
User and Group ID start with 0 and end with 65535.
0 - root user and group
1 - 500 for system users and groups
501 - 60000 for Normal user and groups
60001 - 65535 for duplicate user and group id.
A user can be assigned with multiple ID and these multiple ID numbers are chosen from this range of Duplicate ID range.

* Use man pages for more help.


While searching about it i got following questions :
i      How to create user without group ?
ii     How to create user with already created group ?
iii    How to create user without password ?
iv    How to create user with more groups ?
v     Is possible to change primary group of user ?
vi    How to remove user from the group ?
vii   How to delete a user ?
viii  How to delete a group ?  
ix    How to make a user as root privileged ?
x     Is it possible to edit passwd / group file manually ? And it take affects in user and group ?
xii   Is it possible to create a user without user directory and how ?

Monday, January 30, 2012

Play NFS (Need For Speed) or other Games on Full Screen in Laptop with Windows 7

Now a days most of people playing NFS serious (NFS Most Wanted , NFS Carbon etc.) in Laptop.

We are facing the problem that NFS game does not play in full screen mode. It have some black bar at both right and left side.

We can fix it with simple steps, For this your video driver should be installed with it's "Graphics & Media Control Panel" application.

Here i have explained it with screen shot. It'll be mostly same for Intel boards. Settings for other video drivers may differ. You may need to search for it in their graphics control panel.


Step 1 :

Click aero button at right bottom corner for show available notifications and running process. There is Graphics & Media Control Panel Icon.
If it is not avaliable there, you can get it from "Windows Control Panel".
It'll open your "Graphics & Media Control Panel".
 


Step 2 :

Click Graphics & Media Control Panel icon and choose Graphics Properties...


Step 3:

Under Intel Graphics and Media Control Panel,
Display -> General Settings -> Scaling -> Scale Full Screen


That all, Then apply and ok.

Here after your can play any of your favourite game as full screen in your Laptop and Desktop.

Wednesday, January 11, 2012

STEPPED IN TO 3rd YEAR OF MY CAREER

I have successfully stepped in to 3rd Year of My Career

As

Network Administrator.

I am Very Happy.

KUMAR

Wednesday, December 21, 2011

Install and Uninstall VMware .bundle in Redhat - RHEL 6

Here the steps for Install and Uninstall VMware .bundle in Redhat and also Linux. I have checked with RHEL 6.

For install :
Login in as root user, Type following command

~]# sh VMware-***.bundle

Here *** will be your software and it's version.

This command will display normal GUI installation. Choose option as your wish.

For Uninstall :
Login in as root user, Type following command


~]# vmware-installer -l

This will display your product name and product version installed by VMware.

Ex:
*
*
*
Product Name         Product Version    
========== ==============
vmware-player        4.0.1.528992   

Note Name and Version, Use following command to uninstall

~]# vmware-installer -u {product-name} {product-version}

Ex:
~]# vmware-installer -u vmware-workstation 8.0.1.528992

Now you can uninstall with GUI.

* This is common for all VMware .bundle installation files. Ex: VMware-Workstation, VMware-Player etc.

Tuesday, December 13, 2011

Clear Samba Passwords from Windows

Following command will use to clear samba user name and passwords in windows.

net use /delete \\10.1.1.1

* Replace 10.1.1.1 with your samba server address.

* Can use this command with command prompt or with "Run" Directly.

* You can create this command with .bat file for single click delete.

Thursday, August 18, 2011

User accounts in Linux

Super User in Linux

Super User is the user with all rights for accessing all files, Like Windows Administrator. Here the super user is "root".

This user have all rights to access all files including system files. Should be careful if you are root. It can delete any files. So it may crash total system.

The root user can be created at the time of installation.


Adding User in Linux

The root user can add user to Linux box. Following command can be used for adding user in Linux.

[root@LocalHost ~]#useradd kumar

For setup password, Following command can be used,

[root@LocalHost ~]#passwd kumar
Changing password for user kumar.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

You'll get a warning message if you give any dictionary word.
"BAD PASSWORD: it is based on a dictionary word"

You can create user without password, also can disable password for a user. Passwordless account.

[root@LocalHost ~]#passwd -d kumar
Removing password for user kumar.
passwd: Success

For more details use man pages of useradd and passwd.

Every user have home directory as the user name, location is /home/{user name}.


Delete User

Following command is used to delete user,

[root@LocalHost ~]#userdel kumar

It delete user alone, home directory will be avaliable in /home/

For delete home diectory of the user, we use the option -r.
For delete the user forcely , we use the option -f.


User Groups

We can add groups in Linux, Groups are used for permission to accessing files and security. Group have one or more users.

For add group,

[root@LocalHost ~]#groupadd adminnote

When we create a user it automatically create group in the same user name. Every users must be in group, Every user have one primary group and may or may not secondary group. For Example, kumar is the user and he should be in the group kumar, It's primary group of the user kumar. And the user kumar may or may not in the group adminnote.

For checking group of the user, try following command.

[root@LocalHost ~]#groups kumar
kumar : kumar

For more details about this refere some Books of Linux.

Wednesday, August 3, 2011

Basic in Linux

Linux is one of the operation system. We can tell it as UNIX like operating system. It is open source, It come under GNU public license. We can use it as free. For more and updated details about Linux try Wikipedia.

Now we'll go for learning Linux throw command line, Before go administration these are some basics,

Terminal

The terminal is using for executing commends in Linux box. If we open terminal, it looks as bellow

[kumar@LocalHost ~]$

Here "kumar" is user account in Linux box. "LocalHost" is host name of your system, that means your system name. Normally till (~) symbol mention home directory of the logged user. If you are as root user , it looks as bellow

[root@LocalHost ~]#

Here you can see a difference in both things, that is dollar ($) symbol and Hash (#). There normal user have $ symbol at end and root user have # symbol at the end. This is easily to identify which user we have logged.

Executable commends in Linux are stored in /bin and /sbin directories. The normal user are can access only commends under /bin , They can's use /sbin commends. But the root user can access both /bin and /sbin directory commends.

root is the administrator account. If we made and mistakes while in root account, there is chance to crash hole system.

man:

man is a very basic command in Linux box. We normal know it as man pages. The man pages are manual of commands. most of the commands in Linux have man pages. It describe all about commands. The syntax of the man page is "man {command}"

ex:
[kumar@LocalHost ~]$man ls 

ls:

ls is the basic command in Linux box, ls is used to list files.
ex: 
[kumar@LocalHost ~]$ ls
[kumar@LocalHost ~]$

Here we didn't create any files, so it didn't give any output.

cat:

cat command is used to show the file. And also this is used to create and append the file.

cat {FileName} - Open file
cat > {FileName} - Create file
cat >> {FileName} - Append file
ex:
[kumar@LocalHost ~]$ cat > filename
hi this is my first file

[kumar@LocalHost ~]$ cat filename
hi this is my first file
[kumar@LocalHost ~]$ cat >> filename
this is additional lines

[kumar@LocalHost ~]$ cat filename
hi this is my first file
this is additional lines
[kumar@LocalHost ~]$

"ctrl + c" used to quit file, It'll save and exit from cat.

We can't edit already created file with "cat" command. For this we are going for other editors available in Linux.
ex: vi, vim etc.,

Before we going to editors we'll see the "ls" command, As seen before ls is the command used for list file in Linux,

[kumar@LocalHost ~]$ ls
filename
[kumar@LocalHost ~]$

This is the file we created as before by "cat".
ex:

[kumar@LocalHost ~]$ ls -l
total 4
-rw-rw-r-- 1 kumar kumar 50 Aug  3 11:47 filename

Here -l is the option for ls command, It give some detailed information about the file or directory.

"total 4" is blocks used by the file "filename".

"-rw-rw-r--" is about file permission, we'll see about it later.
"1" is about file count.
"kumar" is owner of file
"kumar" is group under this file
"50"  file size
"Aug 3 11.47" file creation date and time
"filename" name of the file

for more option try man pages and try more,

mkdir:

mkdir is the command used to create folder in Linux box.
ex:
[kumar@LocalHost ~] mkdir myfolder

rm:

rm is the command used to remove folder or file.
ex:
rm {filename}

options:
-f used to force the deletion, it won't ask conformation
-r used for recursive deletion, i meant it used to delete entire folder

[kumar@LocalHost ~] rm -f filename
[kumar@LocalHost ~] rm -fr myfolder

vim:
vim is the editor, It is advance version of the vi editor. vim editor can be used to create, edit and update file.

ex:
[kumar@LocalHost ~] vim newfile

It'll open editor window, Normally it in uneditable mode. By press "i" key we can move to edit mode, to quit from edit mode, press "esc" key.
After finish typing, press "esc" key and type ":wq" for save and quit. Here w for save and q for quid vim. We can use this command separately. For quit without changes, ":q!".

For more options try man pages.