1833044 Members
2771 Online
110049 Solutions
New Discussion

Re: create user

 
augusto cossa
Frequent Advisor

create user

Good Day,

1 - I would like to create user with:

user name: eng
passwd: eng

This user should have read/write/execute access on the /stm directory only.


2 - Why when I do restore from tape that was backed up using SAM changes the users permission? for example:

drwxr-xr-x 4 oracle dba 1024 Sep 5 14:33 oracle

after restore changes to

drwxr-xr-x 4 root root 1024 Sep 5 14:33 root

How to avoid this thing?

Help on this.

Thanks,
Augusto

2 REPLIES 2
Andy Monks
Honored Contributor

Re: create user

For adding a user, use sam and then ensure that the permissions for the /stm directory allow this user to access it. As for not allowing them anywhere else, you'll need to give them the restricted shell, in which case they can't use the 'cd' command.

As for restoring the tape, it sounds like you typing in frecover manually?

Did you use the correct options? Did the directory exist before you recovered it with different ownerships?
Stefan Farrelly
Honored Contributor

Re: create user


1. To create the new user simply use the command;
useradd -g eng -d /stm eng
The group eng must already exist in the /etc/group file, if not add it in manually.
I take it /stm will be their home directory ? if not change the -d to say /home/eng
and to set the permissions on /stm for this user do>
chown eng:eng /stm
chmod 700 /stm
But these permissions (700) mean no-one else can access the /stm directory, only eng or superuser.

2. There has already been a question about restoring oracle files and the permissions dont come back correctly, see the following link for answers;

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x8f5e68c57f64d4118fee0090279cd0f9,00.html
Im from Palmerston North, New Zealand, but somehow ended up in London...