我的 Ubuntu 13.04 上有一个用户,他的用户名是:me,他的名字是 Man
另外,我不知道用户名和他的名字之间的区别(在用户帐户中,他显示为:
Man
me
在我决定安装 truecrypt 之前,我从未遇到过此用户的问题。
下载“truecrypt-7.1a-linux-x64.tar.gz”并解压后,会创建一个文件,文件名为 truecrypt-7.1a-setup-x64。
我尝试通过运行此文件来安装 truecrypt,但没有成功。
我也尝试了 sudo,但仍然没有成功。
通过 sudo 运行 nautilus 并查看文件权限选项卡后,权限为:-rw-------
所有者为:“Man”,但组为“me”,
尝试将文件的组权限更改为“只读”,结果出现以下错误:
**The owner could not be found**
sorry, could not change the owner of "truecrypt-7.1a-setup-x64": Specified owner 'Man' doesn't exist
并且 nautilus 立即关闭
有谁能帮助我:
1)了解用户名(我)和他的名字(Man)之间的区别
2)如何解决我在更改该文件的权限和安装 truecrypt 时遇到的问题?
答案1
如果您要查看/etc/passwd
文件(您可以cat /etc/passwd
从运行使用终端),您将看到系统账户的列表,其中给出了每个账户的一些有用信息,在您的情况下包括me
(Man
)用户账户。
系统的每个用户(或用户帐户,包括)每行包含一个条目。所有字段都以冒号 ( ) 符号分隔。/etc/passwd
总共七个字段如下:me
:
- 用户名:用户登录时使用,长度在1到32个字符之间(在您的情况下,该字段应该是
me
)。 - Password: An x character indicates that encrypted password is stored in
/etc/shadow
file. - User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.
- Group ID (GID): The primary group ID (stored in
/etc/group
file) - User ID Info: The comment field. It allow you to add extra information about the users such as user's full name, phone number etc (in your case this field should be something like
Man,,,
). - Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes
/
- Command/shell: The absolute path of a command or shell (
/bin/bash
). Typically, this is a shell. Please note that it does not have to be a shell.
Source: Understanding /etc/passwd File Format.
Now, regarding the second question, to change the user ownership to user me
for truecrypt-7.1a-linux-x64.tar.gz
file, run the following command in terminal:
sudo chown me:me truecrypt-7.1a-linux-x64.tar.gz
See man chown
and man chmod
for more info.