posted by Will Senn on Tue 8th Jun 2004 05:35 UTC

"Minix, Page 4/4"

Secure the OS - Just for Fun

Until you decide to become a Bochs master and hook up networking, which is not covered here, you probably need not be overly concerned with security. However, you should definitely not be logging in as root, because it's too easy to muck things up. Minix provides a user called bin that is able to do many of the same things as root - see the documentation for a full description. I tend to create a regular user and su to bin and then, if needed, su to root to do those sorts of things.

Change the root password

1. Boot into Minix and login as root.

The command to set a password is passwd user, if no user is specified, passwd defaults to the current user. Since you are logged in as root, simply type 'passwd' and enter a decent password:

    passwd
Note: The root password is also the root of any users that have a group id of 0, such as bin, so changing the root password also changes it for bin.

Create a new user

1. Create a group for normal users:

    vi /etc/group
2. Add the line (9 is the next available group number):
    users:*:9:
Here's a screenshot of vi /etc/group.

minix
Note: I could not find a groupadd, grpadd, addgroup, addgrp, or vigr command, so this is my approach - please let me know if there's a better way...

3. Create a home directory to contain the all of the user's home directories

    mkdir /usr/home
4. Add the user
    adduser usernamegoeshere users /usr/home/usernamegoeshere
5. Assign the user a password - give them a good password
    passwd usernamegoeshere
6. Log out and back in as the user
    exit
    noname login: usernamegoeshere
    password: userpasswdgoeshere
7. Shutdown Minix
8. Power off Bochs
9. Back up the image

The hard disk image now contains a working Minix installation that you can play around with to your heart's content.

Stuff and Sundry

Time in Minix running on Bochs

Time is funny - fast, slow, where does it go? The Bochs emulator has a bug (feature?) related to it's timing - time is faster in Bochs than in the outside world. What this means is that some time dependant processes complete much more quickly than they would in 'real time'. From a practical standpoint, it means that if you take more than a couple of seconds to login, the system will think it has timed out. Thankfully Minix doesn't have screen savers enabled by default. The solution to the login problem, sadly, is to type fast!

Shutting down Minix

It is absolutely critical that you use the command:

    shutdown -h now
This allows Minix to exit gracefully. I have not had good experiences with:
    halt
    or the three finger salute - ctrl-alt-delete

Powering off Bochs

Do not just exit Bochs, use the Power button.

Conclusion

I hope that this has been an interesting read and that you will give Minix a shot - whether on Bochs or in native mode. Please let me know what you think, constructive criticisms, if you please.

Email the author Will Senn

Resources

Andrew Tanenbaum's Minix Site at vrije Univeriteit amsterdam
Al Woodhull's Minix Site at Hampshire College
The Minix 2.0.4 manpages
Browseable Minix 2.0.2 Source Code
MINIX-L Mailing List, Join! We welcome all interested folks.
Read comp.os.minix on usenet
Operating Systems: Design and Implementation 2ed by Andrew Tanenbaum and Albert Woodhull
Email the author Will Senn

References

PearPC 0.1: Is It A Miracle?, Thom Holwerda, OSNews.com May 18, 2004
Is Torvalds really the father of Linux?, Stephen Shankland, CNET News.com, May 19, 2004
Some Notes on the "Who wrote Linux" Kerfuffle, Release 1.5, Andrew Tanenbaum, May 20, 2004
Ken Brown's Motivation, Release 1.2, Andrew Tanenbaum, May 21, 2004


If you would like to see your thoughts or experiences with technology published, please consider writing an article for OSNews.
Table of contents
  1. "Minix, Page 1/4"
  2. "Minix, Page 2/4"
  3. "Minix, Page 3/4"
  4. "Minix, Page 4/4"
e p (0)    40 Comment(s)