From LedHed's Wiki
Jump to: navigation, search
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Creating Groups'''
+
== Groups ==
 
''groupadd''
 
''groupadd''
  groupadd -g 2001 ftpgroup
+
  groupadd -g 2001 groupname
  
'''Creating Users'''
+
-g = GID
 +
<br>
 +
 
 +
== Users ==
 
''useradd''
 
''useradd''
  useradd -u 2001 -s /bin/false -d /bin/null -c "pureftpd user" -g ftpgroup ftpuser
+
 
 +
  useradd -u 2001 -s /bin/false -d /bin/null -c "Users Real Name" -g group username
 +
useradd -m username
 +
 
 +
-u = UID
 +
<br>
 +
-s = Shell
 +
<br>
 +
-d = Home Directory
 +
<br>
 +
-c = Comment (User's Real Name Typically)
 +
<br>
 +
-g = Default Group
 +
<br>
 +
 
 +
 
 +
=== Modify Users ===
 +
usermod
 +
 
 +
=== Expire Password ===
 +
chage -d 0
 +
or
 +
passwd -e username
 +
 
 +
 
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 22:45, 15 August 2015

Groups

groupadd

groupadd -g 2001 groupname

-g = GID

Users

useradd

useradd -u 2001 -s /bin/false -d /bin/null -c "Users Real Name" -g group username
useradd -m username

-u = UID
-s = Shell
-d = Home Directory
-c = Comment (User's Real Name Typically)
-g = Default Group


Modify Users

usermod

Expire Password

chage -d 0

or

passwd -e username