1851747 Members
2331 Online
104062 Solutions
New Discussion

Deleting

 
SOLVED
Go to solution
Grayh
Trusted Contributor

Deleting

I would like to delete the User Oracle and Group DBA

Oracle:zArY01LC00zjo:110:1025:Oracle User:/export/home/Oracle:/bin/csh

dba::105:

I have done it incorrectly

27 REPLIES 27
Ivan Krastev
Honored Contributor
Solution

Re: Deleting

Use userdel and groupdel.
If you want to delete home directory of the user use -r option.

regards,
ivan
Grayh
Trusted Contributor

Re: Deleting

Thank u Ivan..

Could you also give me the complete command to create the user Oracle with Admin Previliges in the Group DBA .

And if u dont mind also the complete command to create the group DBA.
Kenan Erdey
Honored Contributor

Re: Deleting

Hi,

or you can do it from sam. Please take care that it'll ask you if you want to delete users' files also. check the suitable option for you.

Kenan.

Computers have lots of memory but no imagination
Grayh
Trusted Contributor

Re: Deleting

I have deleted and recreated a group with gid 105

Now I want to create a user Oracle with admin previlages and assigne it to the group dba

Can anyone give me the command to do that
Ivan Krastev
Honored Contributor

Re: Deleting

Better don't give admin privileges to oracle user. Use sudo instead.

For creation regular user oracle with group dba use:

#useradd -g 105 oracle

for more options see the man page - http://docs.hp.com/en/B3921-90010/useradd.1M.html

regards,
ivan
Sajjad Sahir
Honored Contributor

Re: Deleting

Dear Garyh

groupadd is the command to create new groups
if u want to add user with group
u can use useradd command
see man pages of useradd
otherwise
u can use sam also it is more easier.
for deleting group
u can use groupdel command
for deleting user
userdel -r then username

sajjad
Grayh
Trusted Contributor

Re: Deleting

Hi,

Thank you.

User Oracle should be able to ftp.

Connected to 10.3.90.9.
220 MAHP01 FTP server (Revision 3.0 Version wuftpd-2.6.1 Wed Dec 19 08:45:38 GMT
2007) ready.
User (10.3.90.9:(none)): oracle
331 Password required for oracle.
Password:
230-No directory! Logging in with home=/
230 User oracle logged in.
ftp>

Could you suggest me to add something to it.

Also could u tell me where can I find sudo and how to install it.
Grayh
Trusted Contributor

Re: Deleting

I am constantly getting the error 230-No directory! Logging in with home=/ when I ftp to oracle

How can I manage it
Kenan Erdey
Honored Contributor

Re: Deleting

Hi,

you didn't specify a home directory when creating user. you would add user with -m option.

for sudo you can search sudo in software.hp.com
you'll download it from internet express package.
Computers have lots of memory but no imagination
SKR_1
Trusted Contributor

Re: Deleting

if you want to ftp with oracle user, you need to comment out oracle user from

/etc/ftpd/ftpusers file

Thanks

SKR
Suraj K Sankari
Honored Contributor

Re: Deleting

Hi,

Oracle:zArY01LC00zjo:110:1025:Oracle User:/export/home/Oracle:/bin/csh
dba::105:


If you want to change the group id 1025 to 105 just open the /etc/passwd file and change the value from 1025 to 105 thats all.


Suraj
V. Nyga
Honored Contributor

Re: Deleting

Hi,

"error 230-No directory" - seems like the directory '/export/home/Oracle' doesn't exist at your server.
Btw - that's one advantage of using SAM to create a user, you're asked if you want to create the home-dir. Mark this point, then you'll always be at the save side.

HTh
Volkmar
*** Say 'Thanks' with Kudos ***
Javed Khan_1
Valued Contributor

Re: Deleting

Hi,

I would like to delete the User Oracle and Group DBA

Oracle:zArY01LC00zjo:110:1025:Oracle User:/export/home/Oracle:/bin/csh

dba::105:

Considering there was typo for group

$Useradd -m -d /export/home/oracle -c "Oracle User" -s /bin/csh -u 110 -g 105 oracle

$passwd oracle


if you have already created the user buy its unable to find home directory

check if /export/home/oracle exist and has proper permission oracle:dba

then do

$usermod -d /export/home/oracle oracle
Never Give Up
Javed Khan_1
Valued Contributor

Re: Deleting

Hi,


you do not need sudo as you do not need root privilege


I guess you mentioned admin privilege for oracle which you already have since oracle database is owned by user oracle

Regards,
Javed Khan
Never Give Up
Grayh
Trusted Contributor

Re: Deleting

How to give the user oracle read write and execute permissions
Grayh
Trusted Contributor

Re: Deleting

I have two directories in /export/home with oracle & Oracle

Is it ok to have.... two directories


$ pwd
/export/home

$ ll
total 0
drwxrwxrwx 2 oracle dba 96 Sep 25 19:18 Oracle
drwxrwxrwx 2 oracle dba 96 Sep 26 09:21 oracle
SKR_1
Trusted Contributor

Re: Deleting

you can have but it would be better if you have some differnece in these names. This will create confusion in future for you.

For setting permissions you need to use

chmod

Thanks

SKR
James R. Ferguson
Acclaimed Contributor

Re: Deleting

hI:

> How to give the user oracle read write and execute permissions

To what?

> I have two directories in /export/home with oracle & Oracle

OK.

> Is it ok to have.... two directories

Sure, what's the question?

Regards!

...JRF...
V. Nyga
Honored Contributor

Re: Deleting

Hi,

you have had the user Oracle with the home-dir /export/home/Oracle - when you have deleted the user Oracle you can delete his old home-dir /export/home/Oracle too.
You SHOULD do it to get no confusion about this directory later (6 months, 1 year, ..).
You don't need it anymore.

> How to give the user oracle read write and execute permissions

You have to check which permissions user oracle needs - I believe in most cases user oracle gets his needed permissions by the installation tool.
So which permissions do you miss?

Volkmar
*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: Deleting

Hmmm - hi again,

you have to check which home-directory you have annouced for user oracle (or is it Oracle?) - either you need /export/home/Oracle OR /export/home/oracle !

You want to make ftp - do we talk about two different servers?
How is the 'oracle-user' defined at both systems? Check carefully!

V.
*** Say 'Thanks' with Kudos ***
Grayh
Trusted Contributor

Re: Deleting

Actaully he is unable to use unzip command

# unzip
sh: unzip: not found.

But when I say man unzip it gives me

UNZIP(1L) Info-ZIP UNZIP(1L)
28 February 2005 (v5.52)

NAME
unzip - list, test and extract compressed files in a ZIP archive

SYNOPSIS
unzip [-Z] [-cflptTuvz[abjnoqsCKLMVWX$/:]] file[.zip] [file(s) ...]
[-x xfile(s) ...] [-d exdir]

DESCRIPTION


But neither the user oracle oracle is able to use unzip nor the root is able to use it.

# ll /usr/local/bin
total 3584
-rwxr-xr-x 1 root 1307 72376 Apr 10 2007 funzip
-rwxrwxrwx 2 root root 419692 Jun 30 12:56 sudo
-rwxrwxrwx 2 root root 419692 Jun 30 12:56 sudoedit
-rwxr-xr-x 2 root 1307 343096 Apr 10 2007 unzip
-rwxr-xr-x 1 root 1307 207264 Apr 10 2007 unzipsfx
-rwxr-xr-x 1 root 1307 1188 Apr 10 2007 zipgrep
-rwxr-xr-x 2 root 1307 343096 Apr 10 2007 zipinfo


V. Nyga
Honored Contributor

Re: Deleting

Try:

/usr/local/bin/unzip

V.

*** Say 'Thanks' with Kudos ***
Grayh
Trusted Contributor

Re: Deleting

Thanks everyone...

/usr/local/bin/unzip worked but i am still not sure why #unzip is not working
Grayh
Trusted Contributor

Re: Deleting

Thank you so much