SLES user Management
SLES 15 support both: local user and domain user management
In this article : we will discuss managing local users
As we know in windows operating system: local users are created in file C:\WINDOWS\
In SLES 15 :
users are created in in /etc/passwd
and their password are encrypted in file /etc/shadow
Also group are created in file /etc/group
Regarding users profile
Users profile is stored at /home , except root account who has /root as exceptional
Managing Local users graphically with Yast
Yast [Yet another Setup Tool ] is great tools for SLES administration
Create local Users With Text Mode
in Networks Pioneer : we will try always to discuss any [how-to] topic in two perspectives :
- Graphicall Mode with Yast
- and Text Mode with shell command
managing Users is NOT exception
let’s go
Add local user command
useradd [username]
Add local user parameters
- -m create home for user as default
- -c > add comments
- -u > specify UID
- -g > add user to group
- – e > set account expire date
- – p > set encrypted password for user
set password for local user
- passwd [username]
below some examples for useradd command
useradd osamah
useradd ali -u 4007
useradd elly -c "elly is lebanon employee "
Also some examples for groupadd command
groupadd G01
groupadd G02
Modify users
Text
title
When creating new local users, several default settings are used by YaST. These include, for example, the primary group and the secondary groups the user belongs to, or the access permissions of the user’s home directory. You can change these default settings to meet your requirements:
Open the YaST User and Group Administration dialog and select the Defaults for New Users tab.
To change the primary group the new users should automatically belong to, select another group from Default Group.
To modify the secondary groups for new users, add or change groups in Secondary Groups. The group names must be separated by commas.
If you do not want to use
/home/username
as default path for new users’ home directories, modify the Path Prefix for Home Directory.To change the default permission modes for newly created home directories, adjust the umask value in Umask for Home Directory.
For information about the individual options, click Help.
Apply your changes with OK.
delete users
use command userdel to delete users
Conclusion
Managing users and group in SLES can be Done Graphically with Yast or by Text command
anyhow : local user can ONLY login to SLES locally , which is NOT practical
next step we will discuss in more details how to manage domain users in SLES