solaris 11 exercise users

Log in to your system and switch user to root.

user1@solaris11-1:~$ su -
Password:
Oracle Corporation SunOS 5.11 11.0 November 2011
You have new mail.
root@solaris11-1:~#

1. Add a TERMINAL setting and alias to /etc/profile and test it.

root@solaris11-1:~# echo "export TERM=vt100" >> /etc/profile
root@solaris11-1:~# echo "alias c=clear" >> /etc/profile
root@solaris11-1:~# su - user1
Oracle Corporation SunOS 5.11 11.0 November 2011
user1@solaris11-1:~$ c

2. Add a testuser to your system.

root@solaris11-1:~# useradd -m -d /export/home/testuser testuser
80 blocks
root@solaris11-1:~#

3. Add an alias to the .profile of the testuser, and test it.

root@solaris11-1:~# echo "alias ll='ls -l'" >> /export/home/testuser/.profile
root@solaris11-1:~# su - testuser
Oracle Corporation SunOS 5.11 11.0 November 2011
testuser@solaris11-1:~$ ll
total 6
-rw-r--r-- 1 testuser staff 165 Apr 30 11:29 local.cshrc
-rw-r--r-- 1 testuser staff 170 Apr 30 11:29 local.login
-rw-r--r-- 1 testuser staff 130 Apr 30 11:29 local.profile
testuser@solaris11-1:~$ exit

4. Set user-quota for the testuser.

root@solaris11-1:~# zfs set quota=1M rpool/export/home/testuser
root@solaris11-1:~# zfs get quota rpool/export/home/testuser
NAME PROPERTY VALUE SOURCE
rpool/export/home/testuser quota 1M local
root@solaris11-1:~# zfs userspace rpool/export/home/testuser
TYPE NAME USED QUOTA
POSIX User root 1.50K none
POSIX User testuser 8K none
root@solaris11-1:~#

5. Switch user to the testuser and create a file to exceed the quota.

root@solaris11-1:~# su - testuser
testuser@solaris11-1:~$ mkfile 2m file1
file1: initialized 917504 of 2097152 bytes: Disc quota exceeded
testuser@solaris11-1:~$ exit

This entry was posted in solaris. Bookmark the permalink.

Comments are closed.