1) create your script (myscript) and add it to /etc/init.d/
2) make it executable: chmod 755 myscript
3) add the appropriate symbolic links: update-rc.d myscript defaults
If you want to remove the script from startup do the following:
$ update-rc.d -f myscript remove
Then remove the script from the init.d directory.
Reference
Tuesday, May 10, 2011
Monday, May 9, 2011
How to change username in Ubuntu
In order to change your old username (old_user) to a new one (new_user) do the following:
(I tried this logged in as a different user)
$ usermod -l new_user old_user
Now change the name of the home directories:
$ mv /home/old_user /home/new_user
Next, edit the /etc/passwd file, look for new_user and change the home directory to the new one.
Now, reboot your computer.
(I tried this logged in as a different user)
$ usermod -l new_user old_user
Now change the name of the home directories:
$ mv /home/old_user /home/new_user
Next, edit the /etc/passwd file, look for new_user and change the home directory to the new one.
Now, reboot your computer.
Subscribe to:
Posts (Atom)