LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2014, 03:04 PM   #1
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
Basic comamnds


Good Morning all;

Ques 1 :

When i use userdel command how can i delete all relative files and home dir to the user.

PHP Code:
[root@oel5 ~]# userdel sam
[root@oel5 ~]# useradd sam
Creating mailbox fileFile exists
useradd
warningthe home directory already exists.
Not copying any file from skel directory into it
Ques 2 :

PHP Code:
# useradd sandya
[root@oel5 ~]# chown -R sandya.oinstall /u03/
[root@oel5 ~]# id sandya
uid=507(sandyagid=509(sandyagroups=509(sandya)

Even the user assigned with oinstall group but id command does NOT display oinstall group details.
Why so 
Ques 3:

By default which users belong oinstall group they can access /u03 mount point.
I want to restrict here.

Only oracle user can access /u03.
Even though others belong oinstall group , i want to restrict to access /u03.

>> is it possible ?
If so , please show me simple example ?

Last edited by thiyagusham; 02-26-2014 at 03:05 PM.
 
Old 02-26-2014, 03:12 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Q1: use the -r flag in userdel
From "man userdel":
Quote:
-r, --remove
Files in the userīs home directory will be removed along with the
home directory itself and the userīs mail spool. Files located in
other file systems will have to be searched for and deleted
manually.

The mail spool is defined by the MAIL_DIR variable in the
login.defs file.

Q2: It looks like sandya is not a part of the oinstall group. What gives you the impression that this user should be a part of the oinstall group?


Q3: Remove group and "other" access from that directory and its contents, and assign the owner to oracle
Code:
chown -R oracle /u03
chmod -R g-rwx,o-rwx /u03
Or change the /u03 group to something that only the oracle user is a part of. Lots of ways to go about this, depending on how you want it to be set up.

Last edited by suicidaleggroll; 02-26-2014 at 03:15 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ghost is very basic. VERY BASIC LXer Syndicated Linux News 0 11-16-2013 09:41 AM
GnuCash, KMyMoney - basic, basic questions - please help if you can. brjoon1021 Linux - Software 3 10-20-2008 07:27 PM
really basic os? gravy Linux - Newbie 7 02-26-2005 10:20 PM
basic Ryan450 Linux - General 5 08-21-2004 12:59 AM
I'm a BASIC chap, looking for some info on BASIC programming CragStar Programming 2 01-21-2001 10:19 AM


All times are GMT -5. The time now is 10:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration