Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, 26 September 2013

Linux Add User To Group

Linux Add User To Group

You can use the useradd or usermod commands to add a user to a group. The useradd command creates a new user or update default new user information. The usermod command modifies a user account i.e. it is useful to add user to existing group. There are two types of group. First is primary user group and other is secondary group. All user account related information is stored in /etc/passwd, /etc/shadow and /etc/group files to store user information.

useradd Example – Add A New User To Secondary Group

You need to the useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. The syntax is as follows:
#useradd -G {group-name} username

Add a new user to primary group

#useradd -g oinstall oracle

Add a existing user to existing group

#usermod -a -G osm oracle
Change existing user tony primary group to dba
#usermod -g dba oracle

Local Yum Setup for RHEL


Local Yum Setup for RHEL

This article helps you in YUM setup in RHEL enviroments

1. Create RPM directory
#mkdir /RPMS
2. Copy all the rpm packages from disk to/RPMS directory
3. install createrepo rpm
#rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
4. createrepo # createrepo /RPMS
5. create a local repo file in /etc/yum.repos.d
#vi /etc/yum.repos.d/local.repo & save the below lines
[local]
name=RHEL-$releasever - Local
baseurl=file:///RPMS/
gpgcheck=0
enabled=1
6. #yum makecache
Enjoy software updates locally.