A question on /etc/passwd file


 
Thread Tools Search this Thread
Operating Systems Solaris A question on /etc/passwd file
# 1  
Old 04-16-2008
A question on /etc/passwd file

I have a question here on /etc/passwd file.

There is a user called user_a, when it is defined in /etc/passwd as below
+user_a:x:::::/bin/ksh
after user_a login, the system could not recognize the correct enviromental variable $USER_A_HOME which is defined in .kshrc file (under /home/user_a folder) as "export USER_A_HOME=$HOME"

However, if the user is defined in /etc/passwd as below
user_a:x:38029:10::/home/user_a:/bin/ksh
the system could correctly recognize $USER_A_HOME as /home/user_a


Normally, if the user is defined as user_a:x:38029:10::/home/user_a:/bin/ksh, the .profile and .kshrc file will be launched by system when user_a login.

I wonder the reason is $HOME is not defined in first setting +user_a:x:::::/bin/ksh

I don't understand the NIS system well. Here I want to know if the user_a is defined as +user_a:x:::::/bin/ksh, what will the system execute when it login.
# 2  
Old 04-16-2008
I believe it is because you don't have an entry in /etc/passwd in the home directory field. When the user logs in Solaris gets the users home dir from there. Once that happens it is too late to set it in your startup script. Another way to look at it is consider the home directory something that the user can't set for himself - it is set by the system at login time.

If a user could choose their own home directory and change it after login you could have all kinds of security or other issues come up.
# 3  
Old 04-17-2008
Thank you for the reply.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reading etc/passwd file

I am new to UNIX and I am trying to read an etc/passwd file. I have 2 questions. 1) Looking at several of the User IDs, there are appears to be alphanumeric characters under the password column, for Root and Oracle. Does this mean that the password is not encrypted? 2) Should I be... (9 Replies)
Discussion started by: McMeatface
9 Replies

2. SuSE

Passwd question

Hello, I'm trying to set my SuSe severs to have accounts lock after 35 days. I have googled this and all I can find is the -f option for when the account password expires. usermod -f user On other systems this locks the account even if the password is not expired. Can someone pint me in... (6 Replies)
Discussion started by: bitlord
6 Replies

3. 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

4. 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

5. AIX

Default /etc/passwd file

Hello All, Can anyone post the default /etc/passwd file for AIX? I would like to compare with an existing machine of mine and want to identify what are the default users that are created when the O/S is installed. In other words I would like to see the system users in AIX. Not the ones created... (1 Reply)
Discussion started by: lovesaikrishna
1 Replies

6. 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

7. Linux

missing passwd file

Hi Guys, I wonder how I can login into a linux system without having the passwd file. I was testing a script that unfortunately renamed my passwd file so now everytime I try to login on that system because it can't identify what shell to use basically it doesn't let me login. Any ideas.... (4 Replies)
Discussion started by: hariza
4 Replies

8. HP-UX

/etc/passwd file manipulation

Hi How the user is allowed to change his password with passwd command, although /etc/passwd has read only rights. How this file gets modified upon changing password??? Thanks in advance for this query (1 Reply)
Discussion started by: puneet
1 Replies

9. 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

10. 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
Login or Register to Ask a Question