Pages

Thursday, February 23, 2012

How to enforce a 14 digit password in Solaris

By default, Solaris sets the password length to around 8 digits. Many IT security departments want at least 14 digit passwords. Longer passwords make the system more secure.

The Solaris 10 OS needs to have the following settings to enforce a 14 digit password.

In /etc/security/policy.conf change the following line from _unix_ to either 1 or md5.
CRYPT_DEFAULT =_unix_ To
CRYPT_DEFAULT =1
In /etc/default/passwd change the password length line from 8 to 14.
PASSLENGTH=8 To PASSLENGTH=14

Tuesday, February 21, 2012

Installing Firefox on a Solaris server.

I looked all over the internet for a how-to for installing Firefox and could not find one. Even the Firefox web page and the download sites didn't have one. Basically the "powers that be" assumed everyone just knew how to do this. Well it is quite easy. Listed below, are the steps for installing Firefox on a Solaris system. This should as work for Linux systems as well, but it is best to use the Linux package manager.

Perform the following tasks as root.
1) Find the location where Firefox is installed and write it down.
# which firefox
/usr/bin/firefox
# ls -l /usr/bin/firefox
/usr/bin/firefox     ->   /usr/lib/firefox/firefox
# ls -l /usr/lib/firefox/firefox
/usr/lib/firefox/firefox
So in this case Firefox is installed at /usr/lib/firefox directory.

2) Download the latest version from OpenSolaris.org or unixpackages.com (sunfreeware).
http://hub.opensolaris.org/bin/view/Community+Group+desktop/development
http://unixpackages.com/packages/mozilla

3) Remove the old version.
# rm -r /usr/lib/firefox
You can also install on top of the old version, if you want. I don't recommend doing this because this will leave behind old unneeded files. It might be a good idea to backup the old files first or install the new version of Firefox in different directory to test.

4) Move file and extract the contents.
# mv firefox-* /usr/lib/
# cd /usr/lib/
# bzip2 -cd files.tar.bz2 | tar xvf -
The commands on the last line work like this; bzip2 uncompress the file and sends the output to tar, which then extracts this archive to the current directory. You have just installed Firefox.

5) Check to see if it works
# firefox
Make sure to test all possible uses of Firefox, such as pages that use JavaScript and Java.

Possible issues

You may need to relink /usr/bin/firefox  to  /usr/lib/firefox/firefox
# ln -s /usr/lib/firefox/firefox /usr/bin/firefox
Anther site that might be usefull.
http://support.mozilla.org/en-US/questions/759697

*** Update ***
The site that hosted the files used in this how-to is no longer online. I have posted new instructions for installing Firefox on this blog. Click on the below to see them.

Installing Firefox on Solaris Update

Tuesday, June 21, 2011

Adding a new user to a UNIX based system

This page is all about adding users to your system using the command line. All the all steps in account creation will be explained. On this post I will go over adding the user to the system with the useradd and adduser commands. Then I will use the passwd command to set the users password on the system. I also mention the usermod command that modifies existing system accounts.

This page is a work in progress if you have an input post below and I may add the content to this blog.

The useradd and adduser commands add new user to the UNIX based system.
Affected files:
/etc/passwd
/etc/shadow
/etc/usr_attr
/etc/groups

Some System Administrators add accounts to there systems by editing the above files by hand or with a script. It can be done this way without any problems, but using the useradd and adduser commands are better because they copy the default files to the new users home directory and set the proper permissions
useradd command syntax
useradd [options] {username}
Example:
root@earth> useradd -u 25 -g staff -G ftp,users -m -d /export/home/newuser -c "newuser" -s /bin/bash newuser

Explained
-uSets users ID to 25
-gSets primary group membership to staff
-G Sets secondary groups memberships to ftp,users
-mMakes the uses home directory
-dSets path to home directory
-sPuts in a comment into the /etc/passwd file.
-sSets users default shell
newuser       Put the name of the account at the end
-fSets the number days the account can be inactive before it is locked (Solaris). For Linux systems it sets the number of days after the users password expires before the account is locked.
-eSets account expiration date

In many Linux distros you need only to do is this.
useradd  newuser
The OS will fill in the rest for you based on the system default.

adduser [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire mm/dd/yy] [-p passwd] [-n] [-r] name
adduser -D [-g group] [-b base] [-s shell] [-f inactive] [-e expire mm/dd/yy]

If you make a mistake then you can use usermod to modify an existing account. The usermod command works just like useradd,

passwd command changes the password of a user account.

passwd username

Remove password hash in /etc/shadow for a user.
passwd -d username

passwd newuser
  • Note: if you don't put a user name at the end of the passwd command then it will change the root password.