Lost /etc/passwd file


 
Thread Tools Search this Thread
Operating Systems Solaris Lost /etc/passwd file
# 8  
Old 06-05-2012
On Solaris, usual location is /export/home/usename.
# 9  
Old 06-05-2012
When you created the two users, did you actually specify their UIDs as they had before with the -u switch (useradd -u UID)? Otherwise, this is going to cause permission issues as the system identifies a user by its UID, not by it's logon name. You have to change the permission of the home directory and the subsequent file/dirs like this:
Code:
chown -R oradevx /export/home/oradevx

# 10  
Old 06-05-2012
Quote:
Originally Posted by admin_xor
You have to change the permission of the home directory and the subsequent file/dirs like this:
Code:
chown -R oradevx /export/home/oradevx

I wouldn't suggest that. There is no guarantee all files under that directory belongs to oradevx, nor that no files outside that directory belong to the same user. It is much better to fix the uid in the passwd and shadow files.

---------- Post updated at 01:16 ---------- Previous update was at 00:59 ----------

Quote:
Originally Posted by bartus11
On Solaris, usual location is /export/home/usename.
That's indeed an usual place where the home directories are stored. However, the best practice is still to follow the Unix tradition to have home directories accessed with /home/username. On Solaris, /home is by default handled by automountd which is used to map /home entries to their physical location when properly configured.
# 11  
Old 06-06-2012
Quote:
Originally Posted by alvaradogunner
By the way, some of my files are having an ID as an owner instead as a user name, is there any way to solve this?
That's what happens when the user ID can't be found in /etc/passwd. Nothing explodes, they just stop showing names.

Make the proper user's ID match the ID showing on the files you mentioned and they will start having names again.
# 12  
Old 06-06-2012
The find command with option -nouser is very useful for finding all the files and directories where the UID does not appear in /etc/passwd.
Similarly find with -user set to a numeric UID to find all files and directories for a particular UID whether or not it appears in /etc/passwd.
Obviously use the usermod command to adjust UIDs in /etc/passwd (NOT vipw or whatever). Always copy the /etc/passwd and /etc/shadow files before making any changes like this.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

2. Shell Programming and Scripting

Finding my lost file by searching for words in it

Got a question for you guys...I am searching through a public directory (that has tons of files) trying to find a file that I was working on a longggggg time ago. I can't remember what it is called, but I do remember the content. It should contains words like this: Joe Pulvo botnet zeus... (5 Replies)
Discussion started by: statichazard
5 Replies

3. UNIX for Dummies Questions & Answers

help with passwd file

Not an unix expert, I read a few pages on the web about passwd files, but I didn't find the answers I need about the last 8 lines of the passwd file I'm taking a look at. I'm assuming their shortcuts to another file that may have the actual usernames of users on the system. Please, any help... (1 Reply)
Discussion started by: fusion31
1 Replies

4. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

5. UNIX for Dummies Questions & Answers

Lost file

I have another problem. I have a text file in which I had written a number of quotations to use in my paper. Luckily, I know that the file is somewhere in my ~/UnixCourse directory or in some subdirectory directly or indeirently within it. I also know that the file name ended in '.txt'. I know i... (1 Reply)
Discussion started by: starwind4
1 Replies

6. Shell Programming and Scripting

help in /etc/passwd file

Hi all, As all of us know that in /etc/passwd file the first field correspond to username could any one tell me what is bin , damoen etc in the first field, and r they in user field , what is nologin in the last column ? root:x:0:0:root:/root:/bin/bash ... (4 Replies)
Discussion started by: useless79
4 Replies

7. Solaris

Lost space on file system

Hi everybody, I got a problem on my SUN server in Solaris 9. I'll try to explain, if somebody could help me. I have mounted some volumes in RAID 0+1, that is stripped slices and then mirror. To be clear the result of metastat d80 is as follow : d80: Mirror Submirror 0: d81 State:... (2 Replies)
Discussion started by: aribault
2 Replies

8. Cybersecurity

/etc/passwd file

hi Does anyone anyone know what the last line of a unix user passwd file signifes? Mine shows "+:::::" best (4 Replies)
Discussion started by: s_mad010
4 Replies

9. Filesystems, Disks and Memory

Lost Data Lost Admin

First time so excuse my ignorance please. I may not be accurately describing the issue. I have inherited a small lab mostly SUN V120s. We lost power and are trying to recover. Nope no backups... The primary issue I have is 1 box is an Oracle Server. It has 2 36Gb harddrives. I am able to... (3 Replies)
Discussion started by: murphsr
3 Replies
Login or Register to Ask a Question