This chapter includes:
Neutrino is a multiuser operating system; it lets multiple users log in and use the system simultaneously, and it protects them from each other through a system of resource ownership and permissions.
Depending on the configuration, your system boots into either Photon (i.e. graphical) or text mode and prompts you for your user ID and password. For more details, see the Controlling How Neutrino Starts chapter in this guide.
|Your system might have been configured so that you don't have to log in at all.|
When you first install Neutrino, the installation process automatically creates a single user account called root. This user can do anything on your system; it has what Windows calls administrator's privileges. UNIX-style operating systems call root the superuser.
Initially, the root account doesn't have a password. To protect your system, you should:
You need to log in as root to do some things, such as starting drivers, performing system-administration tasks, and profiling applications.
The default command-line prompt indicates which user ID you're using:
For information about changing the prompt, see “.kshrc” in the Examples appendix.
If you've configured your system to start Photon, the system automatically starts phlogin2 or phlogin to display a login dialog. Enter your user name or click your user icon, enter your password, and then click Login.
If your system is configured to boot into text mode, the system automatically starts the login utility, which prompts you for your user name and then your password.
|If you type an invalid user name, the system prompts you for the password anyway. This avoids giving clues to anyone who's trying to break into the system.|
Text mode on an x86 machine could be on a physical console supplied by devc-con or devc-con-hid. On any other type of machine, you could be connecting to the target via a serial port or TCP/IP connection.
After you've logged in, the system automatically runs the /home/username/.profile script. This script lets you customize your working environment without affecting other users. For more information, see Configuring Your Environment.
|The su (switch user ID) utility also lets you run as another user, but temporarily. It doesn't run the user's profiles or significantly modify the environment. For more information, see the Utilities Reference.|
Even if your system started Photon automatically, you can exit your Photon session and run in text mode.
If you start a terminal session from within Photon — for example, by clicking Terminal on the shelf — the pterm utility starts a shell that runs as the current Photon user. You can log in and out as a different user, just as in text mode, but when you log out, the pterm window closes.
You rarely need to reboot a Neutrino system. If a driver or other system process crashes, you can usually restart that one process.
|Don't simply turn off a running Neutrino system, because processes might not shut down properly, and any data that's in a filesystem's cache might not get written to the disk. For information about reducing this effect, see “Filesystems and block I/O (devb-*) drivers” in the Fine-Tuning Your System chapter.|
To shut down or reboot the system in text mode, use the shutdown command. You can do this only if you're logged in as root. This utility has several options that let you:
In Photon, you can run phshutdown from the command line, or choose Shutdown from the Launch or Desktop menu. By default, you don't have to be root to do this.
Before shutdown and phshutdown shut down the system, they send a SIGTERM signal to any running processes, to give them the opportunity to terminate cleanly. For more information on these utilities, see in the Utilities Reference.