MayfieldGlobal

Everything from operating systems, programming to web development and more.

Archive for the ‘Linux’ Category

Jan
13

I receive the message: “<username> is not in the sudoers file. This incident will be reported.”. How do I enable sudo?

Posted under Linux, Shell

The sudo command allows users to perform tasks as another user - most commonly, the root user. Using sudo instead of su - has significant advantages. Most notably is that all operations performed with sudo are logged to: /var/log/secure.

To use the sudo command, the user (in this article, the user is ned) must be added to the: /etc/sudoers configuration file.
Read the rest of this entry »

Jan
11

How do I change the name of an existing user account in Linux?

Posted under Linux, Shell
  1. From the desktop, press Alt+F2 to launch the Run Application window.
  2. Type:gnome-terminalthen press Enter. This will launch a user terminal (similar to Windows command prompt).
  3. At the terminal prompt, type:suthen press Enter. When prompted, type the root (administrator) password then press: Enter. You now have a root terminal session.
  4. At the root terminal, type:usermod -l new old where new is the new username and old is the old / existing username then press: Enter. The username is now changed.

Jan
10

How do I change the access permissions for a file or directory using chmod?

Posted under Linux, Shell

The chmod (change mode) command is used to set file and directory permissions in Linux operating systems. The most common use of chmod is to grant or revoke read (r), write (w) or execute (x) permissions for an owner / user (u), a user group (g) or other / anonymous (o) users. Below is a depiction of a typical permissions set for a file:

read permissions for owner / user (u)
|write permissions for owner / user (u)
||execution permissions for owner / user (u)
||| read permissions for other / anonymous (o)
||| |write permissions for other / anonymous (o)
||| ||execution permissions for other / anonymous (o)
||| |||
-rwxr-xr-x
| |||
| ||execute permissions for user group (g)
| |write permissions for user group (g)
| read permissions for user group (g)
file/directory ("-" for file "d" for directory)

Current permissions information may be obtained by using the terminal command:
Read the rest of this entry »