جلسه ششم - 13 خرداد 1389
باز هم با بحث یوزرها ادامه می دهیم. در این بخش می خواهیم ببينيم اختیارات و توانمندی های یک یوزر و در واقع قدرت آن به چه عواملی بستگی دارد. پاسخ مشخص است :به مجوزها و اختیاراتی که دارد و گروه هایی که عضو آنها می باشد. حال گروه های پیش فرض و اصلی ویندوز را بررسی می کنیم.
Administrators
مشخص است منظور کاربرانی با دسترسی کامل روی سیستم هستند. یوزر administrator به صورت پیش فرض و ذاتی عضو این گروه است.
Users
هر یوزر جدید به طور پیش فرض در این گروه قرار می گیرد. اعضای این گروه اختیارات بسیار کمی دارند مثلا ساعت را نمی توانند تنظیم کنند. درایور نمی توانند نصب کنند. به تنظیمات کارت شبکه دسترسی ندارند ولی قادر به انجام برخی موارد مانند ساختن کانکشن اینترنت و یا بکاپ گیری از فایل های خودشان هستند.
Network Configuration Operators
همان اعضای گروه یوزر هستند که البته می توانند تنظیمات شبکه (TCP/IP) را انجام دهند.
Backup Operators
همان گروه یوزر هستند که قادرند از تمام فایل های سیستم نسخه پشتیبان یا بکاپ تهیه کنند.
Power Users
گروهی نسبتا قدرتمند هستند که اختیاراتی مانند Share کردن، نصب برنامه های کوچک، تغییر ساعت، ساخت یوزر (البته با حداکثر اختیاراتی که خودش دارد) را دارا هستند.
Remote Desktop Users
برای وصل شدن به سیستم از طریق یک سیستم دیگر یا اصطلاحا به صورت Remote، یوزر مربوطه باید عضو این گروه باشد. اعضای گروه Administrators به صورت ذاتی این قابلیت را دارند.
Everyone
گروهی که تمام یوزرهای کامپیوتر را دربر می گیرد.
یادمان باشد حتی اعضای گروه Administrators هم عضو این گروه هستند بنابراین اگر مثلا دسترسی به یک فایل را برای Everyone غیر مجاز کنیم، حتی Administrator ها هم دیگر به آن دسترسی نخواهند داشت.
Authenticated Users
منظور یوزرهایی هستند که به سیستم وارد شده یا اصطلاحا Login کرده اند. منظور تمام یوزرهایی است که از طرق مختلف مثلا پای خود سیستم، به صورت Remote، از طریق دسترسی به Share های روی سیستم و ... به آن وارد شده اند. وقتی یوزرها Log off کنند به صورت خودکار از این گروه خارج می شوند. یوزر Guest عضو این گروه نیست.
Anonymous Logon
کسانی عضو این گروه می شوند که بدون وارد کردن یوزر و پسورد و در واقع بدون Authentication وارد سیستم شوند. مثل زمانی که Simple File Sharing تیک دارد و Guest هم Enable است. یا مثل زمانی که یک FTP site روی سیستم ساخته ایم و تیک anonymous آن را زده ایم یعنی برای استفاده از آن نیازی به یوزر و پسورد نباشد. (در این مورد بعدا توضیحات لازم ارایه خواهند شد)
دستورات خط فرمان
از این به بعد در بسیاری از درس ها دستورات خط فرمانی مرتبط با مباحث ارایه خواهند شد. به عنوان یک مدیر شبکه، لازم است این دستورات را بدانید و در مواقع لازم از آنها استفاده کنید. برخی فکر می کنند یادگیری این دستورات و استفاده از آنها فقط برای به رخ کشیدن معلومات یا به قول خودمان کلاس گذاشتن به درد می خورد. این تصور کاملا اشتباه است. برخی اوقات یک دستور شما را از ده ها کلیک ماوس و زدن و برداشتن تیک های مختلف خلاص می کند. ضمنا می توان از این دستورات در فایل های دسته ای یا Batch Files استفاده کرد. بسیاری از اوقات هم به دلایل مختلف شما به بسیاری امکانات گرافیکی ویندوز دسترسی ندارید. با این مقدمه و ذکر این مطلب که تمامی مباحث خصوصا دستورات خط فرمانی را باید حتما تمرین کنید و فقط به مطالعه مباحث اکتفا نکنید، به سراغ دستورات خط فرمان مرتبط با یوزرها می رویم :
1- ساختن یک یوزر محلی (local) روی یک سیستم
Net User "نام یوزر" "پسورد" /add
2- حذف یک یوزر
Net User "نام یوزر" /delete
3- Disable و Enable کردن یک یوزر
Net User "نام یوزر" /activeYes / No)
4- مشاهده لیست یوزرهای سیستم
Net User
5- ساخت یک گروه
Net localgroup "نام گروه" /add
6- اضافه کردن یک یوزر به یک گروه
Net localgroup "نام گروه" "نام یوزر" /add
7- حذف عضویت یک یوزر از یک گروه
Net localgroup "نام گروه" "نام یوزر" /delete
8- اطلاعات کلی در مورد یک یوزر (آخرین ورود به سیستم، فعال یا غیر فعال یودن، زمان انقضا و ...) و گروه هایی که عضو آن است
Net User "نام یوزر"
9- اطلاعات کلی در مورد یک گروه و یوزرهای عضو آن
Net localgroup "نام گروه"
خسته نباشید
در جلسه بعد به تغییر اختیارات یوزرها با ترفندهای مختلف به ویژه Group Policy می پردازیم.
دستورات فوق به زبان انگلیسی:
The following example shows the syntax of the net user command: net user [username [password | *] [options]] [/domain]
username {password | *} /add [options] [/domain]
username [/delete] [/domain]
You can use the net user command to create and modify user accounts on computers. When you use this command without command-line switches, the user accounts for the computer are listed. The user account information is stored in the user accounts database. This command works only on servers.
You can use the following parameters with the net user command:
Is the name of the user account you want to add, delete, modify, or view. The name of the user account can have as many as 20 characters.
- password
Assigns or changes a password for the user's account. A password must satisfy the minimum length set with the /minpwlen option of the net accounts command. It can contain as many as 14 characters.
- *
Produces a prompt for the password. The password is not displayed when you type it at a password prompt.
- /domain
Performs the operation on the primary domain controller (PDC) of the current domain. This parameter applies only to computers running Windows NT Workstation that are members of a Windows NT Server domain. By default, Windows NT Server-based computers perform operations on the PDC.
- /add
Adds a user account to the user accounts database.
- /delete
Removes a user account from the user accounts database.
Back to the top
Options for the Net User Command
Activates or deactivates the account. If the account is not active, the user cannot gain access to the server. The default is yes.
- /comment:"text"
Provides a descriptive comment about the user's account (maximum of 48 characters). Be sure to put quotation marks around the text you use.
- /countrycode:nnn
Uses the operating system country code to implement the specified language files for a user's help and error messages. A value of 0 signifies the default country code.
- /expires:{date | never}
Causes the account to expire if date is set. The never option sets no time limit on the account. An expiration date is in the form mm/dd/yy or dd/mm/yy, depending on the country code. Months can be a number, spelled out, or abbreviated with three letters. Year can be two or four numbers. Use slashes (/) with no spaces to separate parts of the date.
- /fullname:"name"
Is a user's full name (rather than a user name). Enclose the name in quotation marks.
- /homedir
athname
Sets the path for the user's home directory. The path must exist.
- /passwordchg:{yes | no}
Specifies whether users can change their own password. The default is yes.
- /passwordreq:{yes | no}
Specifies whether a user account must have a password. The default is yes.
- /profilepath[
ath]
Sets a path for the user's logon profile.
- /scriptpath
athname
Is the location of the user's logon script.
- /times:{times | all}
Is the logon hours. The times option is expressed as day[-day][,day[-day]],time[-time][,time [-time]], and is limited to 1-hour increments. Days can be spelled out or abbreviated. Hours can be 12-hour or 24-hour notation. For 12-hour notation, use am, pm, a.m., or p.m. The all option specifies that a user can always log on, and a blank value specifies that a user can never log on. Separate day and time entries with a comma, and separate multiple day and time entries with a semicolon.
- /usercomment:"text"
Lets an administrator add or change the user comment for the account.
- /workstations:{computername[,...] | *}
Lists as many as eight computers from which a user can log on to the network. If the /workstations option has no list or if the list is *, the user can log on from any computer.
- net help user | more
Displays Help one screen at a time.
NOTE: You can obtain all of the information contained in this article by typing the following command: net help user
***************
Net localgroup
Adds, displays, or modifies local groups. Used without parameters, net localgroup displays the name of the server and the names of local groups on the computer.
Syntax
net localgroup [
GroupName [
/comment:"text"]] [
/domain]
net localgroup [
GroupName {
/add [
/comment:"text"] |
/delete} [
/domain]]
net localgroup [
GroupName name [ ...] {
/add |
/delete} [
/domain]]
Top of page
Parameters
GroupName : Specifies the name of the local group to add, expand, or delete. Used without additional parameters,
net localgroup GroupName displays a list of users or global groups in a local group.
/comment:" text " : Adds a comment for a new or existing group. The comment can contain up to 48 characters. Enclose the text in quotation marks.
/domain : Performs the operation on the primary domain controller of the current domain. Otherwise, the operation is performed on the local computer.
name [ ...] : Lists one or more user names or group names to add or remove from a local group.
/add : Adds a global group name or user name to a local group. You must first establish an account for users or global groups before you can add it to a local group with this command.
/delete : Removes a group name or user name from a local group.
net help command : Displays help for the specified
net command.
Top of page
Remarks
/domain applies only to Windows XP Professional computers that are members of a domain. By default, server computers perform operations on the primary domain controller.
- Using name
Separate multiple entries with a space. Names can be local users, users on other domains, or global groups, but not other local groups. If a user is from another domain, preface the user name with the domain name (for example, Sales\Ralphr).
- Grouping users
Use net localgroup to group users who use the computer or network in the same or similar ways. When you assign rights to a local group, each member of the local group automatically has the same rights.
Top of page
Examples
To display a list of all the local groups on the local server, type:
net localgroup
To add a local group called Exec to the local user accounts database, type:
net localgroup exec /add
To add a local group called Exec to the domain user accounts database, type:
net localgroup exec /add /domain
To add the existing user accounts stevev, ralphr (from the Sales domain), and jennyt to the Exec local group on the local computer, type:
net localgroup exec stevev sales\ralphr jennyt /add
To add the existing user accounts stevev, ralphr, and jennyt to the Exec group of a domain, type:
net localgroup exec stevev ralphr jennyt /add /domain
To display users in the Exec local group, type:
net localgroup exec
To add a comment to the Exec local group record, type:
net localgroup exec /comment:"The executive staff."