SF.net page
Download Alpha3 New updates available in SVN--see below

Some of the tools included (not including exit/logout):



Subversion

Check-out the latest version from SVN:

$ svn co https://unix-sys-tools.svn.sourceforge.net/svnroot/unix-sys-tools

Author

Kris Katterjohn (PGP 0x399147EE)

README:

Unix-sys-tools
http://unix-sys-tools.sourceforge.net
By Kris Katterjohn

This is a collection of programs I wrote that handle some aspects of
the terminal (getty, stty, tty), logging in (login, su), modifying
passwd settings (chsh, passwd), getting some information about the system
(arch, uname) and who you are on it (id, logname, whoami).

It's far from complete or finished and some of the code is pretty crude.
I started writing these to understand more about how UNIX (well, Linux in
my case) works and I have to say I've learned a lot so far. I wrote some
more but ended up taking it out of this because I didn't think it would
be of interest to many others.

I love Open Source so I'm putting this out under the MIT license.

----

These are mostly tested on Linux/x86. Using SF.net Compile Farm, they have
been tested (not thoroughly) on Linux/Alpha, Linux/AMD64, Linux/Power5,
Solaris/x86, Solaris/Sparc, (Free|Net|Open)BSD, and Mac OS X/PPC.

----

For right now:


ARCH

Just like `uname -m`


CHSH

Similar to Julianne Haugh's, but doesn't (currently) check in /etc/shells

chsh [-s <shell>] [user]

shell = login shell to use
user  = username's shell to modify

See README.compile if you don't use shadow passwords


GETTY

It has to be called like this:

getty [-in] [-f <issue file>] [-l <login>] <terminal> <baud> [<TERM>]

and there's the -s flag:

getty -inl <x> ...  ==  getty -s <x> ...

-i = don't print issue file
-f = use issue file different than /etc/issue
-l = use different login program than /bin/login
-n = don't prompt for username


ID

Mostly working

Missing some POSIX options


LOGIN

Can be called with username as it's first argument or prompts for one

See README.compile if you don't use shadow passwords


LOGNAME

Just like POSIX logname


PASSWD

Not exactly feature-rich

passwd [user]

user = user's password to modify

See README.compile if you don't use shadow passwords


STTY

Very similar to POSIX stty, but some combinations are missing.


SU

Similar to Julianne Haugh's

su [-] [username [args]]

-        = invoke user's shell as a login shell
username = become this user
args     = passed to shell


If the "wheel" group exists and has members, only those members are
allowed to su to root. If the group doesn't exist or is empty, anybody
can su to root.

See README.compile if you don't use shadow passwords


SULOGSCAN

sulogscan sulogfile

sulogfile = sulog file to look at (like /var/log/sulog)

This is a small AWK script that summarizes successful and failed su
attempts.


TTY

Just like POSIX tty


UNAME

Just like POSIX uname


WHOAMI

Print username associated with effective user id


LICENSE:

Copyright (C) 2006, 2007, 2009 Kris Katterjohn

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



SF.net OSI/OSD