1. Start the program and execute commands
Write the command or Startup Program command to/etc/rc. Local.
Note: Only "commands that can be executed by logged-on users are allowed" can be executed in the file"
If Mac is permanently modified, write the following statement into/etc/rc. Local.
Ifconfig eth0 down
Ifconfig eth0 HW ether **:**:**:**:**:**
Ifconfig eth0 up
2,Start the script
(1) run the script in/etc/rc. Local.
(2) Add the soft link of the script to the corresponding runlevel (not tested yet)
3. How can I solve the problem that a common user after logging on has the right to execute commands only after executing the root command?
Idea 1:/etc/passwd to change the default shell of this common user to bash
The test is not feasible and only solves the problem of normal user input prompt.
Train of Thought 2: compile as a module? Not tested
Idea 3: Change the UID of a common user to 0 in/etc/passwd, and grant the root permission to the common user (the security is not high !)