Description of problem: The "nx" user is not created by either the freenx-server package nor by the nxsetup script Version-Release number of selected component (if applicable):freenx-server-0.7.3-27.fc17.x86_64 How reproducible: Steps to Reproduce: 1.sudo yum install freenx-server 2.sudo nxsetup Actual results: nxsetup stops with this error: "Setting up special user "nx" ...useradd: cannot create directory /var/lib/nxserver/home" Expected results: A working nx server... Additional info: Here is the complete output of the installation process. The problem is related to the "nx" user not being created. >> sudo yum install freenx-server [...] Running Transaction Check Running Transaction Test Transaction Test Succeeded Running Transaction Installing : nx-3.5.0-11.fc17.x86_64 1/2 Installing : freenx-server-0.7.3-27.fc17.x86_64 2/2 warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root warning: user nx does not exist - using root Verifying : freenx-server-0.7.3-27.fc17.x86_64 Verifying : nx-3.5.0-11.fc17.x86_64 Installed: freenx-server.x86_64 0:0.7.3-27.fc17 Dependency Installed: nx.x86_64 0:3.5.0-11.fc17 >> sudo nxsetup ------> You did select no action. FreeNX guesses that you want to _install_ the server. Type "y" to abort the installation at this point in time. "N" is the default and continues installation. Use "/sbin/nxsetup --help" to get more detailed help hints. Do you want to abort now? [y/N] n ------> It is recommended that you use the NoMachine key for easier setup. If you answer "y", FreeNX creates a custom KeyPair and expects you to setup your clients manually. "N" is default and uses the NoMachine key for installation. Do you want to use your own custom KeyPair? [y/N] y Setting up /etc/nxserver ...done Generating public/private dsa key pair. Your identification has been saved in /etc/nxserver/users.id_dsa. Your public key has been saved in /etc/nxserver/users.id_dsa.pub. The key fingerprint is: [omitted] The key's randomart image is: [omitted] Setting up /var/lib/nxserver/db ...done Setting up /var/log/nx/nxserver.log ...done Setting up special user "nx" ...useradd: cannot create directory /var/lib/nxserver/home >> sudo nxsetup --test ----> Testing your nxserver configuration ... Warning: "/usr/lib/cups/backend/smb" is not executable. Users will not be able to enable printing. Warning: Invalid value "COMMAND_START_GNOME=gnome-session" Users will not be able to request a Gnome session. Warning: Invalid value "COMMAND_START_CDE=cdwm" Users will not be able to request a CDE session. Warning: Invalid value "COMMAND_SMBMOUNT=smbmount". You'll not be able to use SAMBA. Warning: Invalid value "COMMAND_SMBUMOUNT=smbumount". You'll not be able to use SAMBA. Warning: Invalid cupsd version of "/usr/sbin/cupsd". Need version 1.2. Users will not be able to enable printing. Ignore if you use cups > 1.2 Warnings occured during config check. To enable these features please correct the configuration file. <---- done ----> Testing your nxserver connection ... Warning: Identity file /var/lib/nxserver/home/.ssh/client.id_dsa.key not accessible: No such file or directory. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). Fatal error: Could not connect to NX Server. In /var/log/secure, this is what is reported by the ssh server: Aug 6 15:13:23 myserver sshd[3467]: Invalid user nx from 127.0.0.1 Aug 6 15:13:23 myserver sshd[3467]: input_userauth_request: invalid user nx [preauth] Aug 6 15:13:23 myserver sshd[3467]: Connection closed by 127.0.0.1 [preauth] Indeed, no "nx" user was created
The freenx-server package does try to create the user: $ rpm -qp --scripts freenx-server-0.7.3-27.fc17.x86_64.rpm | grep -A 2 preinstall preinstall scriptlet (using /bin/sh): /usr/sbin/useradd -r -d /var/lib/nxserver/home -s /usr/libexec/nx/nxserver nx 2>/dev/null \ || /usr/sbin/usermod -d /var/lib/nxserver/home -s /usr/libexec/nx/nxserver nx 2>/dev/null || : ...and from your log: Setting up special user "nx" ...useradd: cannot create directory /var/lib/nxserver/home What we need to know is why useradd is not able to create the dir. It works just fine for me on F-17.
The error message says "useradd: cannot create directory /var/lib/nxserver/home", but the directory got created anyway, with the .ssh directory and everything. So the error message is probably not representative of what the problem is. I executed the command sudo /usr/sbin/useradd -r -d /var/lib/nxserver/home -s /usr/libexec/nx/nxserver nx -g nx and the nx user, group, and home directory were successfully created. Next I executed sudo userdel -r nx to remove the user, the group, and the home directory (I verified that the nx user, group, and home directory were correctly deleted). Then I tried to reinstall the freenx-server package, and surprisingly, there were no "warning: user nx does not exist - using root" messages this time! Then I executed the nxsetup script, and it worked! - no "useradd: cannot create directory /var/lib/nxserver/home" error message anymore... And the freenx server works perfectly... I don't know what is wrong, but it is very strange because this is a fresh install of Fedora 17 on newly created partitions (thus no configuration files left by other installs). There seems to be some conditions were the nx user can't be created properly.
I'm afraid some kind of a reliable reproducer is required before more can be said/done, closing as CANTFIX until one appears.