homeDirectory is: %@",homeDirectory);
作为标准用户,homeDirectory是/User/Paul,但是当应用程序作为根用户运行时,homeDirectory的值现在是/var/root或者当用户是root用户时,这是否被认为是正常的?我怎么总是能找到“标准用户”的主页文件夹的位置,这些用户最初启动了我的应用程序,然后获得了根权限?
首先,我对Linux很陌生。我用-M选项创建了一个名为"ginny“的新用户。现在,我试图用usermod -d /link/to/directory ginny分配一个主目录,但它没有将主目录分配给用户ginny。: warning : cannot chance directory to /abc: No such file or directorypwd命令为用户ginny返回/root(可能是因为我还没有为她创建主目录<
我想创建一个函数,用用户的主目录(通常是/home/user/)来扩展~user形式的名称,包括~root,它通常是/root/。我知道用于获取当前用户的主目录的getHomeDirectory方法,但我不知道有什么函数可以确定给定用户的主目录。到目前为止-- join path with '/', except at root
head: error reading ‘adt-bundle-linux-x86_64-20140702’: Is a directoryE: Configuration in adt-bundle-linux-x86_64-20140702 is manually managedgtk-fallback.css' does not exist
(zenity:20841): IBUS