Ubuntu:Feisty/UserAdministration
From
[edit]
User Administration
[edit]
How to switch to root user in Console mode
- Read #General Notes
For a login shell as root, i.e. similar to "su -",
sudo -i Password: <specify user password>
or
sudo su - Password: <specify user password>
To start a root shell while maintaining the current directory and various other settings of your normal user (such as the USERNAME environment variable):
sudo -s -H Password: <specify user password>
or
sudo su Password: <specify user password>
[edit]
How to set/change/enable root user password
- Read #General Notes
sudo passwd root
[edit]
How to disable root user account
- Read #General Notes
sudo passwd -l root
[edit]
How to allow root user to login into Gnome
System -> Administration -> Login Window-->Preferences Security -> Allow local system administrator login (Checked)
[edit]
How to add/edit/delete system users
- Read #General Notes
System -> Administration -> Users and Groups Users -> Add User... /Properties/Delete
or
sudo useradd jim sudo userdel jim
- For more info read
man usermod
[edit]
How to add/edit/delete system groups
- Read #General Notes
System -> Administration -> Users and Groups Groups -> Add Group.../Properties/Delete
[edit]
How to automatic login into GNOME
- Read #General Notes
- Automatic login is not secure.
System-->Administration-->Login Window Security-->Enable Automatic Login
Choose a user from the drop-down menu.
[edit]
How to allow more sudoers
- Read #General Notes
EDITOR=gedit sudo visudo
- Append the following line at the end of file
system_username ALL=(ALL) ALL
or, since everyone in the admin group can use sudo:
sudo adduser a_username admin
This appends the admin group to the user's supplementary group list. They will now have sudo access.
[edit]
How to use "sudo" without prompt for password (not secure)
- Read #General Notes
EDITOR=gedit sudo visudo
- Find this line:
system_username ALL=(ALL) ALL
- Replace with this line:
system_username ALL=(ALL) NOPASSWD: ALL
[edit]
How to kill the "sudo" session
- Read #General Notes
sudo -K
[edit]
How to change files/folders permissions
- Read #General Notes
Right click on files/folders -> Properties
Permissions Tab -> Read/Write/Execute (Checked the permissions for Owner/Group/Others)
[edit]
How to change files/folders ownership
- Read #General Notes
sudo chown system_username /location_of_files_or_folders
If you want to change ownership of all containing files and folders recursively, use the -R option like this:
sudo chown -R system_username /location_of_files_or_folders
[edit]
How to change files/folders group ownership
- Read #General Notes
sudo chgrp system_groupname /location_of_files_or_folders
If you want to change group ownership of all containing files and folders recursively, use the -R option like this:
sudo chgrp -R system_username /location_of_files_or_folders

