- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Permissions for /home/<user> .profile and .login
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 04:10 AM
05-31-2005 04:10 AM
Permissions for /home/<user> .profile and .login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 04:18 AM
05-31-2005 04:18 AM
Re: Permissions for /home/<user> .profile and .login
It sounds like something else may have changed. Changing the permissions to 444 on the files you listed should not cause these kinds of problems. More telling is you mention the files all got changed to the UID.
File ownership is always in reality just the UID. /etc/passwd file is referenced for that UID and the name is pulled from there. It sounds like the UID/owner was changed on these files. If you were to grep for the user you are refering in /etc/passwd I believe you will notice that the UID is not the same as the UID that owns the files.
A quick way to fix (especially if this was a global change) would be:
find / -user bad_user_id -print | xargs chown correct_user_id
where bad_user_id is the UID that now owns the files and correct_user_id is either the login name (e.g. oracle) or it's UID.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 04:27 AM
05-31-2005 04:27 AM
Re: Permissions for /home/<user> .profile and .login
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 04:50 AM
05-31-2005 04:50 AM
Re: Permissions for /home/<user> .profile and .login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 04:50 AM
05-31-2005 04:50 AM
Re: Permissions for /home/<user> .profile and .login
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 05:09 AM
05-31-2005 05:09 AM
Re: Permissions for /home/<user> .profile and .login
/etc/profile - all users read access only
/etc/login - should not exist on the system
.profile (for each home directory) - only user and root to have write access
.login (for each home directory) - does not exist on the system
cshrc (for each home directory) - file(s) do not exist on the system
All this to prevent access of hackers and prevent malicious-type commands.
So... I should not have changed the permissions of .profile and should have removed the .login files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 05:09 AM
05-31-2005 05:09 AM
Re: Permissions for /home/<user> .profile and .login
Removing write permission from .profile and .login should not have cuased any problems.
The ownership of the files being a UID number indicates that the user that used to own the files no longer exists in /etc/passwd, OR, the users don't have read access to /etc/passwd so that they can resolve UIDs to user names.
The /etc/passwd file should be readable by everyone (444 permissions).
Is the same UID the owner of ALL files? Or is it different for the files in each home directory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 05:19 AM
05-31-2005 05:19 AM
Re: Permissions for /home/<user> .profile and .login
My tcb file ownership/permission settings are like this
-rw-rw-r-- 1 root root 157 Nov 18 2003 mysql
just as a reference for you to compare and we do not have any problems like you described.
As Patrick said in the previous post, UID instead of username may indicate that the user which owned those files may no longer exist. Make sure the UID and the usernames are still in sync in the passwd file. Sometimes, I have seen, converting to a trusted base or someone trying to tidy up the /etc/passwd file can cause this kind of grief by simply fatfingering something in an otherwise very simple script.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 05:32 AM
05-31-2005 05:32 AM
Re: Permissions for /home/<user> .profile and .login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 05:55 AM
05-31-2005 05:55 AM
Re: Permissions for /home/<user> .profile and .login
-rw-r--4-- 1 21347 users 439 Apr 21 2004 /home/user1/textfile
what you need to compare is if user1's UID in /etc/passwd is actually 21347 or something else. If it is something else, this will explain the replacement of UIDs with usernames, otherwise there must be another reason.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 06:11 AM
05-31-2005 06:11 AM
Re: Permissions for /home/<user> .profile and .login
I guess I need to wait and see what the user reaction is to address this further. Do you have any advice on what I should do now otherwise?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 06:21 AM
05-31-2005 06:21 AM
Re: Permissions for /home/<user> .profile and .login
This explains it all...
$ ll /etc/passwd
-rw-r--r-- 1 root root 116396 May 31 13:57 /etc/passwd
example..in my system..
if my user id was senthil..
and the passwd perm would be : -r--r-----
then when i login as senthil.. i will not have permissions to read passwd file..to make a co-relation with the UID and username..this explains why as your login you read only UID instead of username.
Since you corrected the issue,.. now it displays fine.
So you did solve the problem by fixing the permissions on /etc/passwd.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 06:30 AM
05-31-2005 06:30 AM
Re: Permissions for /home/<user> .profile and .login
There should not be any further complaints from your users
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 06:32 AM
05-31-2005 06:32 AM
Re: Permissions for /home/<user> .profile and .login
I even tested my response..Please check below..
After modifying the permission on /etc/passwd
$ ll -d senthil
drwxr-xr-x 2 senthil users 96 May 31 11:29 senthil
$ ll
total 0
drwxr-xr-x 2 0 root 96 Dec 18 2003 lost+found
drwxr-xr-x 2 104 users 96 May 31 11:29 senthil
$ ll -d /etc/passwd
-r--r----- 1 0 root 504 May 31 11:28 /etc/passwd
After restoring back the permission on /etc/passwd.
$ ll
total 0
drwxr-xr-x 2 root root 96 Dec 18 2003 lost+found
drwxr-xr-x 2 senthil users 96 May 31 11:29 senthil
$ ll -d /etc/passwd
-r--r--r-- 1 root root 504 May 31 11:28 /etc/passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2005 06:48 AM
05-31-2005 06:48 AM
Re: Permissions for /home/<user> .profile and .login
Thank you again.