process.seteuid(id)
Note: this function is only available on POSIX platforms (i.e. not Windows, Android)
Sets the effective user identity of the process. (See seteuid(2).) This accepts either a numerical ID or a username string. If a username is specified, this method blocks while resolving it to a numerical ID.
if (process.geteuid && process.seteuid) { console.log(`Current uid: ${process.geteuid()}`); try { process.seteuid(501); console.log(`New uid: ${process.geteuid()}`); } catch (err) { console.log(`Failed to set uid: ${err}`); } }
Please login to continue.