小编mid*_*Cat的帖子

Linux的; 如果您不是root,请将UID更改为root

我写了一个简单的程序

当您运行此程序时,如果您不是root用户,请输入root密码,然后将uid更改为root

if (getuid())
{
    char *pass = getpass("");
    //how to change uid to root ?
}
Run Code Online (Sandbox Code Playgroud)

root密码时如何将uid更改为root ?

c linux root uid

0
推荐指数
1
解决办法
1712
查看次数

标签 统计

c ×1

linux ×1

root ×1

uid ×1