User's Manual
SmartMachines | 16
Managing Users
Every SmartMachine user needs a unique name and must belong to at least one
group. To use the
sudo
command, the user must be a member of the staff group.
To manage users and groups, log into your SmartMachine as admin or use
su
to
become the root user. If you log in as admin, run the commands described in this
section with
sudo
.
Creating Groups
Solaris users are always members of one or more groups. Create groups so that a
set of users can share the same permissions across different files. For example,
create a web group for all files relating to a website.
To create a new group:
sudo groupadd <groupname>
You are asked for the password to the admin account. Once the password is
accepted, the group is created and there is no output to the console.
Verify that the group has been created by looking at
/etc/group
:
grep <groupname> /etc/group
where
<groupname>
is the name you used in the initial
groupadd
command.
Creating Users
To add new users:
sudo useradd -d /home/<username> -m -g <group> -s
/usr/bin/bash <username>
Set the password for the new user with the following command:
sudo passwd <username>
Adding Users to Groups
To change a user’s primary group:
sudo usermod -g <
groupname
> <
username
>
To add a user to a supplemental group:
sudo usermod -G <groupname> <username>










