Operating System - HP-UX
1753479 Members
4862 Online
108794 Solutions
New Discussion

Re: Need to change the UID / GID of user - nobody

 
Chirag Parikh
Frequent Advisor

Need to change the UID / GID of user - nobody

hi Gurus,

 

I need to change the UID / GID of system user -- nobody

 

while changing it, system shows error like below. Need your expert advice.

 

Error -- Cannot modify user 'nobody': Home directory '/' is shared

 

Tried to change the home directory but that too is having some issues.

 

XXXXXX # usermod -d /home/nobody nobody
'/home/nobody' is not a valid directory

XXXXXX# ll -d /home/nobody
drwxr-xr-x 2 root sys 96 Nov 14 10:06 /home/nobody
XXXXXX# chown nobody:nogroup /home/nobody
/home/nobody: Invalid argument

 

Thanks & Regards,

Chirag Parikh

 

 

P.S. This thread has been moved from HP-UX > general to HP-UX > sysadmin. - Hp Forum moderator

3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: Need to change the UID / GID of user - nobody

>>I need to change the UID / GID of system user -- nobody

 

Why?

 

Is the UID and GID of the nobody user still -2?  If so, it should NOT be changed.  That is correct.

 

If it is not '-2' you can edit the /etc/passwd file with the 'vipw' command and manually change the UID and GID.

 

Also, the home directory for the 'nobody' user is, by default, the '/' directory and shouldn't be changed.

 

The nobody entries from /etc/passwd from an 11.23 and an 11.31 system:

 

11.23:

# grep nobody /etc/passwd
nobody:*:-2:-2::/:

 

11.31:

# grep nobody /etc/passwd

nobody:*:-2:-2::/:

Chirag Parikh
Frequent Advisor

Re: Need to change the UID / GID of user - nobody

As far as i am aware, nobody user is only needed if you have any NFS related task on server otherwise there is no harm in changing the values related to this user. I know that the -2 UID is the OS standard but i have application request to change the home directory and UID (if possible)

Dennis Handly
Acclaimed Contributor

Re: Need to change the UID / GID of user - nobody

>I have application request to change the home directory and UID (if possible)

 

You can change the home directory but changing the UID is not recommended.