BSD / Linux - Some UNIX ADMINISTRATIVE Commands

10/14/2003

Users
file /etc/master.passwd contains the user database (see vipw)
/etc/login.conf - login classes - user capabilities database
FreeBSDOpenBSDNetBSDLinux
root Add a user adduser
pw useradd
adduser(8)
useradd
user add
useradd
user add
useradd(8)
root Change defaults for adduser adduser -C adduser -C(8) useradd -D(8)
root Delete a user rmuser(8)
pw userdel
rmuser(8)
userdel
user del
userdel
user del
userdel(8)
user Change user password passwd(1) passwd(1) passwd(1) passwd(1)
root
user
Edit finger database information chpass(1)
chfn=chpass
chsh=chpass
chpass(1)
chfn(1)=chpass
chsh(1)=chpass
chpass(1)
chfn(1)=chpass
chsh(1)=chpass
chfn(1)
chsh(1)
root Modify user database information vipw usermod
vipw(8)
usermod
vipw
usermod(8)
chfn(1)
chsh(1)
vipw
user View user database information finger(1) finger(1) finger(1) finger(1)
user List user logged into this terminal logname(1) logname(1) logname(1) logname(1)
user List logged in users users(1)
who(1)
w(1)
whoami=id -un
id -un
finger(1)
users(1)
who(1)
w(1)
whoami(1)=id -un
id-un
finger(1)
users(1)
who(1)
w(1)(1)
whoami(1)=id -un
id -un(1)
finger(1)
users(1)
who(1)
w(1)
whoami(1)=id -un
id -un(1)
finger(1)
Summary of logins and reboots last last last(1)
??Display User Informationpw usershow userinfo(8)userinfo
??last commands usedlastcommlastcomm(1)lastcomm
??Connect Time Accountingacac(8)ac
??Enable / Disable System Accounting--accton(8)accton
??Show Accounting Statisticssasa(8)sa--
??substitute user identitysu(1)su(1)su
??Execute command as another usersudo
??sulogin