Archive for October, 2006

Solaris – User Management

Exactly a month since the last update! haven’t been experiencing much new things. However, I got my hands dirty on a Solaris machine on Friday, so here it is.

The OS was installed completely, but had no other users except root so I was denied telnet access. Soon I found out that user management in Solaris isn’t like Control Panel > User Accounts. Though somewhere someone said there was a UI user management tool in CDE, we were on the Java Desktop. So down we went into the Terminal.

We managed to finally create users after many trial and errors of different switches to find out what was required and how to fill in the options. We first created a group:

groupadd [groupName]
groupadd test

Simple enough. The useradd command was tougher:

useradd -d [homedir] -g [groupName] -s [shell] [loginID]
useradd -d /home1/test -g test -s /usr/bin/tcsh test

The example I found for the shell path was “/usr/local/bin/tcsh”. Yours could be somewhere else so do an intelligent search for shells with “ls *sh” as you traverse the “/usr” directory. Apparently even as root I had problems using “/home/test” as the home directory, with an error “Invalid Operation”. WTF?

To assign a password to that user, type the following and the shell will prompt you for the password.

passwd [loginID]
passwd test

Well I mentioned I had problems with the home directory so I was trying to adjust it by using “usermod”. Didn’t seem to work. Finally I resorted to “userdel” and redoing “useradd”… 🙁

Once the user was created, I was able to telnet, ssh and ftp into the machine remotely, even perform su to root for adminstrative access.

Comments