How do I make my self admin and use admin commands


9 posts
by computerguy123 » Wed Jan 02, 2013 6:12 pm
I have just tried to get rid of a file but it say i need to be a superuser how would i be able to make my self one and how would i be able to make new users?
I am currently logging in as pi.
Posts: 19
Joined: Mon Dec 31, 2012 4:40 pm
by redhawk » Wed Jan 02, 2013 6:16 pm
You need sudo before a command to make it run with admin (root) rights, alternatively you could just use sudo su instead to login as root without a password. :lol:

Richard S.
User avatar
Posts: 1348
Joined: Sun Mar 04, 2012 2:13 pm
Location: currently on holiday
by computerguy123 » Wed Jan 02, 2013 6:18 pm
it wont let me login as root! :?:
what command in the LXTerminal do I need to do to make pi a admin?
Posts: 19
Joined: Mon Dec 31, 2012 4:40 pm
by rgh » Wed Jan 02, 2013 6:19 pm
To run commands as root prefix them with "sudo", as in "sudo rm /that/file" or similar. You'll be prompted to enter your password. This only works if you have permissions granted for sudo via the file /etc/sudoers (but user pi has that permission). If you want to do lots as user root, you can do "sudo bash" to give you a shell prompt with root privileges.

To create new users from the command line at least, use the "useradd" command. Type "man useradd" to figure out how..
Posts: 205
Joined: Fri Nov 25, 2011 3:53 pm
by joan » Wed Jan 02, 2013 6:20 pm
sudo adduser name
User avatar
Posts: 1840
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK
by computerguy123 » Wed Jan 02, 2013 6:22 pm
so how would i delete the file? :?:
Posts: 19
Joined: Mon Dec 31, 2012 4:40 pm
by computerguy123 » Wed Jan 02, 2013 6:36 pm
how do i delete it?
Posts: 19
Joined: Mon Dec 31, 2012 4:40 pm
by computerguy123 » Wed Jan 02, 2013 6:38 pm
\
Posts: 19
Joined: Mon Dec 31, 2012 4:40 pm
by jojopi » Wed Jan 02, 2013 6:44 pm
computerguy123 wrote:what command in the LXTerminal do I need to do to make pi a admin?
User pi is already an admin, unless you have changed something. To delete a file:
Code: Select all
rm FILE
To delete a file in a place that is owned by a different user:
Code: Select all
sudo rm FILE
User avatar
Posts: 1326
Joined: Tue Oct 11, 2011 8:38 pm