NoMachine Support

Your questions answered

Knowledge Base

Searching in: Articles & FAQs
Filter the search results
Applies to:
Last update:
Searching in: Articles & FAQs
ID: AR09C00259
Applies to: NX Server Products
Added on: 2005-09-08
Last update: 2008-12-17
How to add a user to the NX Server after getting a useradd error

If a user account has been deleted from the system without removing his/her home, the NX administrator who tries to add a new user with the same username will get an error similar to:

#/usr/NX/nxserver --useradd john --system
NX> 100 NXSERVER - Version 2.1.0-22
NX> 102 Password:
NX> 102 Confirm password:
NX> 500 ERROR: Execution of nxuseradd.sh failed when adding user: john.
NX> 500 ERROR: Cannot create directory `/home/john/.fonts': File exists
NX> 500 Cannot create directory `/home/john/.xemacs': File exists
NX> 500 Cannot create directory `/home/john/bin': File exists
NX> 500 Cannot create directory `/home/john/Documents': File exists
NX> 500 Cannot create directory `/home/john/public_html': File exists
NX> 500 useradd: Copying of skel directory failed.
NX> 999 Bye

In this case, please:

1. Make a backup of the user's home directory, for example

    # cd /home
    # tar cvzf john.tar.gz john/

2. Remove the user's home

    # rm -r john/

3. Add the user

   #/usr/NX/nxserver --useradd john --system

In case of an error similar to the following, instead:

# nxserver --useradd john --system
NX> 102 Password:
NX> 102 Confirm password:
NX> 500 ERROR: Execution of nxuseradd.sh failed when adding user: john.
NX> 500 ERROR: useradd: warning: the home directory already exists.
NX> 500 Not copying any file from skel directory into it.
NX> 500 NX> 596 ERROR: NXNODE Ver. 2.1.0-22  (Error id e51B66E)
NX> 500 NX> 596 ERROR: Mon Apr 16 10:57:47 2007 running as user: 'john'
(uid: 520) on ''
NX> 500 NX> 596 ERROR: in node ssh keys manager: add server ssh public keys to user
NX> 500 NX> 596 ERROR: Failed to make dir: /home/john/.ssh: Permission denied..
NX> 304 User: john added to the system.
NX> 801 User: john uses SSHD authentication.
NX> 301 User: john enabled in the NX user DB.
NX> 999 Bye.

it is suggested to:

1. Make a backup of the user's home directory, for example

   # cd /home
   # tar cvzf john.tar.gz john/

2. Remove the user: 

    # userdel john

2. Remove the user's home
   
   # rm -r john/

3. Add the user
   
    #/usr/NX/nxserver --useradd john --system