Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-26-2014, 03:04 PM   #1
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
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

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
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
Q1: use the -r flag in userdel
From "man userdel":
-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

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
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.


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 PM.

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