accerssing user profile?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting accerssing user profile?
# 1  
Old 05-06-2006
accerssing user profile?

Hello there,
I would like to know how can i prevent a normal user (not root user) from accessing his .profile and editing its information?

Also, how can i prevent this user from deleting a certain file named "script"?

Any help in that?

Thanks in advance,
# 2  
Old 05-06-2006
Code:
$chown root /home/username/.profile

Same you have to do with script file. But you need root login to perform this.
# 3  
Old 05-08-2006
Hey,
Thanks for ur reply, just one more question,
when executing the command that u have just gave me, u told me i need to be in root,right??....
moreover, if i want to do the same for the script file, then instead of the username field in the command i have to type the script file name?
Moreover, what if i want to copy that script file which is being executed by the user to the root home directory, how can i do that?


Thanks for your help.......
# 4  
Old 05-09-2006
Yeah, you have to provide the path of that particular script for which you want to change the ownership.

Regarding, home directory of root, the home directory for each user takes the form /home/username (where username is the name of the user account). But the home directory of the root is traditionally /, on many newer systems it is located at /root (Linux, BSD), or /var/root (Mac OS X)
So it depends on which OS you have.

How to copy a file, this is the syntax:

$cp /source /destination

For more information about cp, check the manual page of cp with command:

$man cp

Regards,
Tayyab
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying the .profile of one user to another.

I want to copy .Profile file from user1 homedirectoryto user2 homedirectory in Aix. Please help me with the process. (4 Replies)
Discussion started by: Laxxi
4 Replies

2. Shell Programming and Scripting

User profile, environment

Hello , i am on sles 11, and i can't figure out how can i locate my profile file, the one that is use for setting the environment when i log in. oracle@r200:~> cd oracle@r200:~> pwd /opt/oracle oracle@r200:~> echo $SHELL /bin/bash oracle@r200:~> oracle@r200:~> cat .profile cat: .profile:... (4 Replies)
Discussion started by: tonijel
4 Replies

3. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

4. AIX

Which file has the user profile?

It's been a long time since I've done this and I can't remember which file is needed to edit. I would like to change the prompt for a user on my AIX 5.3 box, but I don't see a .profile file or a rc.ksh file to edit. Which file do I need to edit to get this? (1 Reply)
Discussion started by: bbbngowc
1 Replies

5. IP Networking

how can i find a user profile

Hi I want to know how can i find a user when he has logged in, at what time and how many days, anyone can help me (1 Reply)
Discussion started by: darwinscp@hotma
1 Replies

6. UNIX for Dummies Questions & Answers

How can I find a user profile

Hi, I want to know how can i find a user when he has logged in and how many times and days (2 Replies)
Discussion started by: darwinscp@hotma
2 Replies

7. UNIX for Dummies Questions & Answers

refresh user profile

Scenario: a non-root user is under primary group "devel" and I change their primary group to "nondevel"; I then want to be able to give the user a command which refreshes their user profile so that any new files created under their session are assigned to the new group. What is the command for... (1 Reply)
Discussion started by: dhinge
1 Replies

8. UNIX for Dummies Questions & Answers

User Profile

Hi Guys, Im really new with this stuff...could anybody help to guide me ...how do i change/edit user profiile ? (2 Replies)
Discussion started by: gagasan_makmur
2 Replies

9. Shell Programming and Scripting

User profile

Sorry to I am not familiar with script writing , attach is the /etc/profile in my system , we have limit each user can only have one login in the system . When the user login , if the system found the user have a dead process in the system , the system will confirm the user to kill the previous... (1 Reply)
Discussion started by: ust
1 Replies
Login or Register to Ask a Question