|
Blue Forest http://www.lslnet.com at 20:18 on April 6, 2006
Freebsd some basic knowledge (novice look)
Adding users in FreeBSD (1)
Društvo Lavigne
01/03/2001
FreeBSD is a multi-user environment; One of the main system administrator to create user accounts and provide users with a safe working environment. To be effective in this regard for the need to create any number of users is expected before planning.
Even if you are the sole user of personal FreeBSD system, we still need to create a user account to at least completed the work. Remember that the only authority in the super-users need only use the super user accounts.
In your FreeBSD system planning exercises such as a system administrator is a good idea, because you can manage growth in the "real" production environment basic techniques.
When you create a user, a lot of things will happen in the background : some updated database, catalog and mail users host catalog. When established customers, you must provide a certain amount of information, including user name and password. In this article, I intend to focus on strategy and the creation of user accounts on the users.
You have to be created for each user accounts in the sole name of a system in FreeBSD. This can be easily done in a smaller environment, but if you need a dozen, or even hundreds of thousands of users on a point slightly more difficult. To help ensure that only, you should have a user name strategy. Without proper strategy, you need to establish a name, for some users who remember the restrictions. First, users who should be limited to the 16 characters within, and some agreements, such as NIS, users who need less than eight characters. Second, the users were not even characters in "-" chapeau. Third, you should avoid the use of capital letters and phrases, because they confuse mail procedures.
In a smaller environment strategy sample of users can use to create user names and surnames in alphabetical name. You may have to be some amendments to avoid this conflict. For example, if you need to set up Mike Smith and Mike Spencer account, we can create "mikes" and "michaels", or "mikesm" and "mikesp."
Other strategies can be used and the user name is the acronym for appropriate amendments to establish a user ID in order to avoid conflict. If you need to set up accounts for Mark Smith and Michelle Smith, can create "smithma" and "smithmi."
In larger environments, you may need more characters, said names and surnames. For example, if a part-naming strategy is the first four characters of the first four characters named heel, then Mark Smith should be "marksmit" and Michelle Smith should be "michsmit." You need to have a backup plan for those name is less than the specified number of characters. For example, if I need to use this strategy to build an account My Lee, I should establish a "my_lee."
Unless you are in a very small environment, avoid non-descriptive nicknames, as I used the system in their "biko" and "genisis" is a more sensible.
In short, a good strategy indicates that the user name of the users were restricted, but to avoid a conflict of emergency order method.
Once you order a program, you can use the adduser tool to create user accounts. This tool /etc/adduser.conf a configuration file, it will read a message /etc/adduser.message document. Adduser tools used for the first time in these documents before you has not been established. Now join me in creating a user; I would use the v switches or verbose, so we could see all the reminders. You will see adduser first established its configuration file, and then taking it as a template to create customers.
Adduser-V
You are not root!
Oh. This appears to be a need root权限 management. Let us try one more time :
Su
Password :
Adduser-V
/etc/adduser.conf : No such file or directory
This is the first time I can see the use of the system. "Adduser" tool; It is not a configuration file.
Use option "-silent"
If you not specified 't want to see all warnings and questions.
Check /etc/shells
Check /etc/master.passwd
Check /etc/group
Enter your default shell : bash csh date no sh tcsh [sh] : tcsh
Adduser retrieval system with the installation of a device to explain all orders of the paper path /etc/shells; users can then display the interpreter. Note that the default interpreter is available to users Bourne shell (sh), but I put it into tcsh.
Your default shell is tcsh ->; /bin/tcsh :
Enter your default HOME partition : [/home] :
Copy dotfiles from : /usr/share/skel no [/usr/share/skel] :
End users in the building and when we receive a document from the point /usr/share/skel catalog copy of the information to see that we will be able to see what the contents of that catalog.
Send message from /etc/adduser.message no file :
[/etc/adduser.message] :
Create "/etc/adduser.message?" (Y/n) [y] :
Use passwords (y/n) [y] :
Write your configuration to /etc/adduser.conf? (y/n) [y] :
Adduser /etc catalog can be seen in the creation and adduser.conf adduser.message documents. Now ready to build our users :
Ok, let 's go.
Don 't Worry about mistakes.
I will give you the chance later to correct any input.
Enter username [a-z0-9_-] : dlavigne
Enter full name [] : Društvo Lavigne
Enter shell csh date no sh tcsh [tcsh] bash :
Enter home directory (full path) : [/home/dlavigne]
Uid azimuth :
Enter Login class : default [] :
Login group dlavigne [dlavigne] :
Login group is "dlavigne."
Invite guest no dlavigne into other groups :
[no] :
Enter password : []
Enter password again [] :
Name : dlavigne
Password : ****
Fullname Društvo Lavigne :
Uid : 1000
Gid : 1000 (dlavigne)
Class :
Groups : dlavigne
HOME : /home/dlavigne
Shell : /bin/tcsh
OK? (y/n) [y] :
Added user "dlavigne"
Send message to "dlavigne" and no root second_mail_address :
[no] :
Društvo Lavigne.
Your account "dlavigne" was created.
Have fun!
See also chpass (1), finger (1), passwd (1)
Add anything to default message (y/n) [n] :
Send message (y/n) [y] :
Copy files from /usr/share/skel to /home/dlavigne
Add another user? (y/n) [y] : n
Goodbye!
I have now successfully created a user, I will leave the super-user accounts. Let us take the new user groups, to look at what they describe here : the Eastern and
Login : dlavigne
Password :
Pwd
/usr/home/dlavigne
1s -la
Total 12
Drwxr-xr-x 2 dlavigne dlavigne 512 Dec 30 11:21. /
Drwxr-xr-x 4 512 Dec 30 10:44 root 车. . /
Dec 30 1628 10:44 dlavigne dlavigne -rw-r--r-- 1. Cshrc
-rw-r--r-- 1 Dec 30 10:44 dlavigne dlavigne 299. Login
-rw-r--r-- 1 Dec 30 10:44 dlavigne dlavigne 160. Login_conf
-rw------- 1 Dec 30 10:44 dlavigne dlavigne 371. Mail_aliases
-rw-r--r-- 1 Dec 30 10:44 dlavigne dlavigne 331. Mailrc
Dec 30 3722 10:44 dlavigne dlavigne -rw-r--r-- 1. Profile
-rw------- 1 Dec 30 10:44 dlavigne dlavigne 276. Rhosts
-rw-r--r-- 1 Dec 30 10:44 dlavigne dlavigne 852. Shrc
You can see a host of users establish a list of documents contained many points chapeau. Remember that the point of reference tools we use adduser paper catalog? Let us now look at :
1s - l /usr/share/skel
Total 10
Drwxr-xr-x two root 车 512 Dec 8 11:53. /
Drwxr-xr-x 26 Nov 20 08:11 root 车 512. . /
Nov 20 1628 07:01 车 -rw-r--r-- one root dot.cshrc
-rw-r--r-- One root dot.login 车 299 Nov 20 07:01
-rw-r--r-- One root dot.login_conf 车 160 Nov 20 07:01
-rw------- One root dot.mail_aliases 车 371 Nov 20 07:01
-rw-r--r-- One root dot.mailrc 车 331 Nov 20 07:01
Nov 20 3722 07:01 -rw-r--r-- one root 车 dot.profile
-rw------- One root dot.rhosts 车 276 Nov 20 07:01
-rw-r--r-- One root dot.shrc 车 852 Nov 20 07:01
We can see new customers in the host's list of eight documents from the catalog copy of the document template. It also can super-users can only see editorial skel The list of documents. For example, if you want all users of the command interpreter has been suggested that its customized, super-users can amend usr/share/skel/dot.cshrc document, the document will establish accounts at the host catalog copy to all users. Also, super-users in the catalog can also be placed in any other point he hoped users; For example, you can set up user customization good. Xinitrc documents.
Now let us look at the tools created by adduser /etc/adduser.message documents :
More /etc/adduser.message
#
# Message file for adduser (8)
# Comment : "#"
# Default variables : $name, $fullname, $password
# See /etc/adduser.conf after other variables :
Line # "# # DO NOT Base DELETE THIS LINE!"
#
$fullname.
Your account "$name" was created.
Have fun!
See also chpass (1), finger (1), passwd (1)
Let us convert it and compare the information received from new customers; I use mail order users of the mail message :
Login : dlavigne
Password :
You have mail.
Mail
6/6/93 Mail version 8.1. Type? For help.
"/var/mail/dlavigne" 1 new message :
"N 1 genisis Sat Dec 30 12:24 20/540" Welcome "
& 1
Message 1 :
From genisis Sat Dec 30 12:24:19 2000
Date : Sat, 30 Dec 2000 12:24:19 -0500 (EST)
From : User Genisis
To : dlavigne
Subject : Welcome
Društvo Lavigne.
Your account "dlavigne" was created.
Have fun!
See also chpass (1), finger (1), passwd (1)
Saved one message in mbox & ^D
"; ^D Exit
You can see that I become super-users to use the adduser ordered that the former is based on users "genisis" recorded. I adduser.message new users to the information received is contained in the content and variables are inserted $fullname $name the actual value and were replaced.
When the account established, we will be following options :
Add anything to default message (y/n) [n] :
If I want to create other accounts and enter y, I will be indicated below :
Use. " "^D Alone or on a file to launch your message
I enter the content will be added to the default message, and then to the specific users; However, this document does not cover /etc/adduser.message I originally created. Let us try something to do so; I will add as a "test" account, and the output of our concern "Cut" rest :
Adduser
"Cut";
Add anything to default message (y/n) [n] : y
Use. " "Or ^D alone on a line to launch your message.
Don 't forget that every sharp is pizzas day!
.
Send message (y/n) [y] : y
Let us now look at what kind of information users test mail :
Login : test
Password :
You have mail.
Mail
6/6/93 Mail version 8.1. Type? For help.
"/var/mail/test" 1 new message :
"N 1 genisis Sat Dec 30 12:47 22/567" Welcome "
& 1
Message 1 :
From genisis Sat Dec 30 12:47:07 2000
Date : Sat, 30 Dec 2000 12:47:07 -0500 (EST)
From : User Genisis
To test :
Subject : Welcome
Test.
Your account "test" was created.
Have fun!
See also chpass (1), finger (1), passwd (1)
Don 't forget that every sharp is pizzas day!
Let's look at the new information is being added to the template file :
More /etc/adduser.message
#
# Message file for adduser (8)
# Comment : "#"
# Default variables : $name, $fullname, $password
# See /etc/adduser.conf after other variables :
Line # "# # DO NOT Base DELETE THIS LINE!"
#
$fullname.
Your account "$name" was created.
Have fun!
See also chpass (1), finger (1), passwd (1)
It seems that only the user has received the additional information, as we expect. I also want documents before leaving adduser.message more examples. I would like to welcome their users in the bottom of the mail received additional information :
If you have any problems, contact the administrator at admin@thiscompany.com
Try to create your own account and one foisted on them this trip information; You will see when you download to the users, did not appear in the mail with additional information. But if you change this trip :
If you have any problems, contact the administrator at admin\@thiscompany.com
Then users will receive the additional information. Attention, we must use symbols to avoid \ @ symbol for the correct interpretation.
Finally, let us look at just created adduser.conf documents :
More /etc/adduser.conf
# /etc/adduser.conf - Automatic generated by adduser (8)
#
# Note : adduser read *and* write this file
# You may change values, but not specified 't add new things before the
Line # "# # DO NOT Base DELETE THIS LINE!"
# Use password for new users
# = Yes | no defaultpasswd
Defaultpasswd = yes
# Copy dotfiles from this dir ( "/usr/share/skel" or "no")
Dotdir = "/usr/share/skel"
# Send this file to new user
# ( "/etc/adduser.message" Or "no")
Send_message = "/etc/adduser.message"
# Configure file for adduser ( "/etc/adduser.conf")
Configure = "/etc/adduser.conf"
# Logfile ( "/var/log/adduser" or "no")
Logfile = "/var/log/adduser"
# Default HOME directory ( "/home")
Home = "/home"
# List of directories where shells located
# Path = ( '/bin,' '/usr/bin,' '/usr/local/bin')
Path = ( '/bin,' '/usr/bin,' '/usr/local/bin')
# Common shell list, the first element has higher priority
# Shellpref = ( 'bash', 'tcsh' and 'ksh', 'csh' and 'sh')
Shellpref = ( 'csh,' 'sh' and 'bash', 'tcsh' and 'ksh' and 'no' and 'date')
# Defaultshell if not empty ( "bash")
Defaultshell = "tcsh"
# Defaultgroup ( 'USER' for same as
# Valid username or any other group)
Defaultgroup = USER
# Defaultclass if not empty
Defaultclass = ""
# Uid new users get this (1000)
Uid_start = "1000"
# # DO NOT Base DELETE THIS LINE!
# # Your own variables, see /etc/adduser.message
# # End
You can see this is a simple document, which contains the tools to adduser suggest the answer. You can see only the document containing the new information adduser paper records storage location. If one looks at this documentation will see the establishment of the account records :
More /var/log/adduser
2000/12/30 12:24:18 dlavigne:*:1000:1000 (dlavigne) : Društvo Lavigne
2000/12/30 12:47:06 test:*:1001:1001 (test) test :
Read more from FreeBSD Basics.
Adding FreeBSD users (2)
Društvo Lavigne
01/10/2001
In the first part, we have to examine the tools used to create user accounts adduser. In this part, we will focus on creating user accounts when the revised document.
When users create a super user accounts, password databases will be added in response to the customers. In fact, you need to update the FreeBSD four password database file. Let us look carefully before they tell us about the format of these documents. The first document is called /etc/passwd, it is that anyone will be able to read ASCII text documents :
File /etc/passwd
/etc/passwd ASCII text :
1s - l /etc/passwd
Dec 30 1054 13:00 -rw-r--r-- one root 车 /etc/passwd
The document must maintain the authority of this form, a lot of tools on FreeBSD not work. However, anyone can read in the paper a password will keep the security risks; To this end, it usually corresponds to the password part of the store to use the * said.
The second document is a document /etc/master.passwd shadow password. This document contains a user password encryption hash. We will discuss it in detail in a future article encryption and hash; Now, imagine for FreeBSD hash for detecting whether the user password legal value.
Let us look at the document type and attributes :
File /etc/master.passwd
/etc/master.passwd ASCII text :
1s - l /etc/master.passwd
Dec 30 1226 13:00 -rw------- one root 车 /etc/master.passwd
Shadow password is ASCII document expressly texts, but the only root can read.
The third and fourth password and /etc/spwd.db /etc/pwd.db documents. They look at the types of documents :
Hash file /etc/*pwd.db/etc/pwd.db : Berkeley DB files (Version 2, Little
Endian, Bucket Size 4096, Bucket Shift 12, Directory Size 256, Segment Size 256.
Segment Shift 8 Overflow Point 3, Last Freed 2, Max Bucket 7, High Mask 0xf.
Low Mask 0x7, Fill Factor 32, Number of Keys 56) : Berkeley DB /etc/spwd.db
Hash file (Version 2, Little Endian, Bucket Size 4096, Bucket Shift 12.
Directory Size 256, 256 Segment Size, Segment Shift 8 Overflow Point 3, Last
Freed 2, Max Bucket 7, High Mask 0xf, Low Mask 0x7, Fill Factor 32, Number of
Keys 56)
Oh, they simply are not ASCII text files, so do not try to use cat, or text editor to open up more of them. These two documents contain ASCII text document with the above-the same information in the form of databases and use it to improve the performance. /etc/passwd /etc/pwd.db Here is equivalent to the database, it does not contain any hash. /etc/spwd.db's Said in the shadow, so it is with etc/master.passwd equivalent database, and contains no hash.
Now we are already familiar with the names of these four documents, look at the type of information they contain. Super User to put /etc/master.passwd sent to the screen, the results appear to be as follows :
Su :
Password
More /etc/master.passwd
# $FreeBSD : Src/etc/master.passwd, v Peter Exp $ 1.25 1999/09/13 17:09:07
#
: : 0:0:Charlie &:/root:/bin/csh root:$1$hnH/w50a$tPdv5HZRsDP46FtsW8eXH/:0:0
Toor:*:0:0 0:0:Bourne-again Superuser:/root : : :
: : 0:0:Owner of many system processes:/root:/sbin/nologin daemon:*:1:1
: : 0:0:System &:/:/sbin/nologin operator:*:2:5
Bin:*:3:7 0:0:Binaries Commands and Source : :,,, : /:/sbin/nologin
: : 0:0:Tty Sandbox:/:/sbin/nologin tty:*:4:65533
: : 0:0:KMem Sandbox:/:/sbin/nologin kmem:*:5:65533
: : 0:0:Games pseudo-user:/usr/games:/sbin/nologin games:*:7:13
: : 0:0:News Subsystem:/:/sbin/nologin news:*:8:8
: : Man Pages:/usr/share/man:/sbin/nologin 0:0:Mister man:*:9:9
: : 0:0:Bind Sandbox:/:/sbin/nologin bind:*:53:53
: : 0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico uucp:*:66:66
: : 0:0:X-10 daemon:/usr/local/xten:/sbin/nologin xten:*:67:67
: : Office Owner:/nonexistent:/sbin/nologin 0:0:Post pop:*:68:6
: : 0:0:Unprivileged user:/nonexistent:/sbin/nologin nobody:*:65534:65534
: : 0:0:User &:/home/genisis:/bin/csh genisis:$1$.3tvchjG$C6wtsUV9FcXF4wzBboisJ/:1001:0
: : 0:0:Dru Lavigne:/home/dlavigne:/bin/tcsh dlavigne:pZV8Ju.2sEqsY:1000:1000
0:0:test:/home/test:/bin/tcsh test : : 1002:1002 : :
Appeared to be less than smooth. When we understand it will be much easier after the format. Each trip includes a paper record of the users, and each record field of 10 with colon separate components. These field topology based on the following sequence :
Name:hash:uid:gid:class:change:expire:gecos:home_dir:shell
You will note that I have 15 of the system's FreeBSD system accounts; last three account (genisis, dlavigne and test) was established by the super-users.
Now look at the separate "dlavigne" This record :
: : 0:0:Dru Lavigne:/home/dlavigne:/bin/tcsh dlavigne:pZV8Ju.2sEqsY:1000:1000
The first field (dlavigne) for download to users of the system by the use of user name.
The second field (pZV8Ju.2sEqsY) is encrypted hash ;dlavigne very lucky, it is not when she entered the password input, and do not know her from the document read out what is the actual password. However, attention to "test" the second field users. Where a blank page, it means that the users do not use common code to read the paper one will know. Further note that many of the second field is a systematic account asterisk (*), and this shows that ordinary users can not account for download.
The third field (1000) is a user UID (user ID); This is used to distinguish between different users of FreeBSD, so it must be unique. When we use adduser tool, it is proposed to create UID 1000 began, I have created more than 1,000 users of all Channels. Attention to user "root" and "toor" UID 0, indicating that they are the super-users.
The fourth field (1000) is the initial user GID (group ID). Default case, when you create a user in FreeBSD, the group will establish a taboo subject.
The fifth field (blank) is the type of users. Categories used to determine environmental setting, speaking accounting and resource constraints. We will discuss the use of categories in the future. Default this field is empty.
The sixth field (0) password deadline. The default is zero field that users do not have to update his password.
Seventh Field (0) user accounts in the period. If the user account expired, the user will no longer posted. The default is zero field that accounts never expired.
Eighth Field (Društvo Lavigne) contains the user's "gecos" comprehensive information. Here users can contain the full name, office location, telephone and home telephone, in the middle simply a comma separated. The term "gecos" a source very interesting. When Unix was first developed at Bell Laboratories, the main computer operation is General Electric Computer Operating System (gecos), the use of the computer addresses of users of existing password information documents were "gecos" field China.
Ninth Field (/home/dlavigne) is the main user list. It is located when users download the catalog.
10th Field (/bin/tcsh) is a user command interpreter shell path.
Let us quickly compare /etc/passwd and /etc/master.passwd documents. I do not need a super user to read these documents, so I would like to withdraw from the super user accounts :
Exit
More /etc/passwd
# $FreeBSD : Src/etc/master.passwd, v Peter Exp $ 1.25 1999/09/13 17:09:07
#
Root:*:0:0:Charlie &:/root:/bin/csh
Toor:*:0:0:Bourne-again Superuser:/root :
Daemon:*:1:1:Owner of many system processes:/root:/sbin/nologin
Operator:*:2:5:System &:/:/sbin/nologin
Bin:*:3:7:Binaries Commands and Source, should : /:/sbin/nologin
Tty:*:4:65533:Tty Sandbox:/:/sbin/nologin
Kmem:*:5:65533:KMem Sandbox:/:/sbin/nologin
Games:*:7:13:Games pseudo-user:/usr/games:/sbin/nologin
News:*:8:8:News Subsystem:/:/sbin/nologin
Man:*:9:9:Mister Man Pages:/usr/share/man:/sbin/nologin
Bind:*:53:53:Bind Sandbox:/:/sbin/nologin
Uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
Xten:*:67:67:X-10 daemon:/usr/local/xten:/sbin/nologin
Pop:*:68:6:Post Office Owner:/nonexistent:/sbin/nologin
Nobody:*:65534:65534:Unprivileged user:/nonexistent:/sbin/nologin
Genisis:*:1001:0:User &:/home/genisis:/bin/csh
Dlavigne:*:1000:1000:Dru Lavigne:/home/dlavigne:/bin/tcsh
Test:*:1002:1002:test:/home/test:/bin/tcsh
It noted that similar documents with the shadow password, but the password field are all replaced with a star hash of the user. Meanwhile, the gaps in the field and the value 0 in this document have been omitted.
You may be noted that when we 1s -1 order in the long list password format documents, these documents have only root written authority. The important point to note is the root not use text editor to directly edit these documents open. When a password change the document, the changes in this document can not be used directly in other password documents. This should be the tools pwd_mkdb. If the root of a need to change the paper I hold in the mouth, he needs to change the use of a tool to turn sent to pwd_mkdb.
Vipw is one of the tools for this purpose. EDITOR environment variable, as defined in order vipw with the editor to open up the entire password documents, usually the editor is vi, it will be called "vipw." If for some reason you from the vi editor is not, then perhaps you should avoid the use of tools or make vipw EDITOR back vi. Other editorial will pack, and it would destroy documents such as password system, and of course this is very bad. To use this tool, you should have the skills to use the vi editor and understanding of the meaning and 10 field represent an acceptable value for each field. Therefore, the only super-users can use this tool.
Other tools for editing documents chpass password, which is also known as chfn or chsh. Any user can change the password to use these tools to document their value fall. I users "dlavigne" download or operation chpass tools :
Login : dlavigne
Password :
Chpass
#Changing User database information for dlavigne.
Shell : /bin/tcsh
Full Name : Društvo Lavigne
Office Location :
Office Phone :
Home Phone :
Other information :
~
/etc/pw.m32496 : Medically line 1 :
Putin noted an overall households only change their default shell and gecos comprehensive information field. I joined an office phone to check what happens. Because I vi editor environment, I use the arrow key documents moved to a suitable location, a push into the future by adding ESC键 mode, and then dialing the telephone number 123-4567. Then again 按ESC, dialing : wq preserved from the vi editor and change. Then the screen will show the following information :
Chpass : updating the database. . .
Chpass done :
Then I become super users find /etc/passwd document and the corresponding items, just to see the changes :
Su :
Password :
More /etc/passwd
Dlavigne:*:1000:1000:Dru Lavigne, and 123-4567:/home/dlavigne:/bin/tcsh
Gecos comprehensive attention to the commas are added to the field that you are worth reading. Listed in the order they always do :
Full_name, office_location, work_phone, home_phone
So I know 123-4567 is the phone user Društvo Lavigne.
Now, I chpass super user operation. If I gave the order parameter as a user name, I can editor of the items belong to the user. For a look at the super-user "dlavigne" for what :
Chpass dlavigne
#Changing User database information for dlavigne.
Login : dlavigne
Password : pZV8Ju.2sEqsY
Uid [#] 1000 :
Gid [# or name] 1000 :
Change [month day year] :
Expire : [month day year]
Class :
Home directory : /home/dlavigne
Shell : /bin/tcsh
Full Name : Društvo Lavigne
Office Location :
Office Phone : 123-4567
Home Phone :
Other information :
~
/etc/pw.B32584 : Medically line 1 :
You should be able to read the user all 10 field instead. Chpass super user accounts can be used to bring users to alter any parameter works user records. If only super-user input :
Chpass
He can change the root account on the record. Chpass tool for users with some super switch will enable users to change a specific record fields; Chpass look at the details of one man.
All documents in the database password security tools to change user password is passwd. I would like to "test" users download and then build a password for the user :
Login : test
I suggest that no import orders, as a "test" At present only an empty password. I use the tools to change in passwd :
Passwd
Changing local password for the test.
New password :
Retype new password :
Passwd : updating the database. . .
Passwd : done
Usually, when users change their password, the system will suggest them to import the old password; It avoids the need to change the password of other users. Let us once again to "test" operation passwd tools :
Passwd
Changing local password for the test.
Old password :
New password :
Retype new password :
Passwd : updating the database. . .
Passwd : done
If users forget their password be? Still not completely finished, because super-users can change their password; When other users of the super-user password changes, the system would not have suggested that he entered into the user's old password :
Su :
Password :
Passwd test
Changing local password for the test.
New password :
Retype new password :
Passwd : updating the database. . .
Passwd : done
That super-users with user names to be used as a tool parameters passwd; If non-users, and then change the password is the root account.
I want to change the password on a final document is a tool rmuser. The instrument was used to delete user accounts and all the things associated with the user; So it is only by the super-user operation. Let us remove the "test" account :
Rmuser
Enter Login name for user to remove test :
Matching password entry :
: : 0:0:test:/home/test:/bin/tcsh test:$1$P6kMmPWG$rZiu/HfaIPVwJC6hdOImc/:1002:1002
Is this the entry you wish to remove? y
Remove user 's home directory (/home/test)? Y
Killed process (es) belonging to the test.
Updating password file, updating databases, done.
Updating group file : (removing personal group is empty -- group test) done.
Removing user 's home directory (/home/test) : done.
Removing user 's incoming mail file /var/mail/test : done.
Removing files belonging to the test from /tmp : done.
Removing files belonging to the test from /var/tmp : done.
Removing files belonging to the test from /var/tmp/vi.recover : done.
, Which is a very effective tool; It documents not only delete the password from the user's information, delete users from the main catalogs, mail and documents belonging to the users of the provisional list of any documents. You should also be noted that the deletion of test users, the password field is not empty, it passwd tool has been successfully updated the password database. |
| |