Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / How do you give yourself complete admin access in Linux?

Author
Message
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 9th Oct 2012 03:17
I am rather new to Linux. I am trying to learn a lot about it and develop on it some. However, I can't really get anyway because I can't create folders where I want to. (I am trying to make a folder in usr) How do I give myself the permission to do this?


Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 9th Oct 2012 03:45
What distribution? ubuntu I'm guessing? Why do you need to create a folder in /usr/?

normally it would just be "su root" to switch your user to the root user, and then you'd have to type in the administrator password, but in ubuntu root is locked be default, so if you wanted to use "su" you'd have to set the password on root (not difficult to do but I don't recall how)

Otherwise, "sudo mkdir" should work fine!

There's probably a way that you can give yourself the highest permissions by default, but that's a bad idea considering a little slip-up in the command line can cause the equivalent of rm -r / (recursively deletes every file!)

DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 9th Oct 2012 03:55 Edited at: 9th Oct 2012 06:51
I'm using Xubuntu. Ubutntu is a bit too heavy for my netbook.

Also, Thanks for the advice. sudo mkdir worked just fine.

Edit: Another question about linux permissions. Is it normal for Gparted to be practically useless? It can't edit a single one of my partitions. All it can do is create new ones from un-allocated space. (I'm getting annoyed with it...) Also, I am typing in my password every time it starts, so, I'd assume it is getting the permissions it needs.


bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 9th Oct 2012 11:38 Edited at: 9th Oct 2012 11:39
you need to unmount any active partitions first. The simplest way is just use a boot disk (or your ubuntu install disc) to run gparted. But you can do it from recovery too (a selection in the boot loader).

Depending on the distro, you can gain root access using:

sudo su
su - root
su root

Visit my blog http://www.canales.me. Also yes I changed my name. It was time for a change.
Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 9th Oct 2012 18:56 Edited at: 9th Oct 2012 18:57
Or use sudo -i

This will basically, assuming your account is setup correctly, switch you to being root fully without actually entering the root password. We normally have to enter our own network password to access a customer machine and then again when sudo -i is used.

We use it all the time these days for client machine access. We used to just login as root, but with all the PCI standards these days restricting what you can and cannot do then we (ie. software development and support departments) had to use this method instead. It means I now don't actually know the root password, but I have all the root access rights (and it says I am root in whoami) which I need for my job. It also logs that it was me that accessed the site incase anything bad happens. I'm guessing I'm not actually *fully* root for the lowest level stuff, but I don't need that sort of level of access for my job anyway.

Just realised, this is Unix (IBM AIX to be 100%) I'm talking about, not Linux. Is probably identical but not everything is, so you never know.

Cheers

Current fave quote : Cause you like musicians and I like people with boobs.
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 9th Oct 2012 21:54
nah, with Ubuntu and most linuxes you do one of the above methods I posted. If your account is setup for it, it'll ask you for your user account password and it'll promote you. With Ubuntu, at least standard desktop/server, you can't even tell what the root password is because it's randomized or, heck, maybe it's not even setup to allow one.

As an aside, on SCO unix you use sush

Visit my blog http://www.canales.me. Also yes I changed my name. It was time for a change.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 10th Oct 2012 06:33 Edited at: 10th Oct 2012 06:35
I'm on Ubuntu and use the command "gksudo nautilus" that will open up a file browser window as root. I too am new to linux so this has been a great help to me. I even have it as a keyboard shortcut I use it so often.

You may need to install "nautilus" first or it might not work on xubuntu, I don't know.

Shh... you're pretty.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 10th Oct 2012 09:43 Edited at: 10th Oct 2012 09:43
Quote: "Or use sudo -i"

:[/b]o

Quote: "sudo su"

b]
O

how did I not know about/think of those?!

PAGAN_old
19
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 12th Oct 2012 23:58
most unix systems have something like su- super user. at least the ones i played with which are mostly free BSD.

Also speaking of unix systems. ive been using fedora on one of my laptops latley and i have a question about "yum" command what does "yum" stand for?


dont hate people who rip you off,cheat and get away with it, learn from them
Dar13
17
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 13th Oct 2012 07:08
Quote: "what does "yum" stand for?"

IIRC, it's the software package manager that Fedora uses.

More info.

PAGAN_old
19
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 13th Oct 2012 10:48
Quote: "IIRC, it's the software package manager that Fedora uses."

ah i see, well i figured that much by how its used. I could tell yum was something like BSD version of "make install clean" or "portextract" or port something.

(free BSD is the only unix system i am vaugley familiar with so i use it as an example)

while BSD commands are self explanitory, i was just wondering what yum stands for as an acronym or something because, its a funny sounding command and isnt obvious right away as to what the command does.


dont hate people who rip you off,cheat and get away with it, learn from them
the_winch
22
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 13th Oct 2012 12:43
http://yum.baseurl.org/

Yum = Yellow dog updater modified.

By way of demonstration, he emitted a batlike squeak that was indeed bothersome.
PAGAN_old
19
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 13th Oct 2012 13:25
cute

Btw, Fedora is a really nice OS. Much friendlier than free BSD althoi havent poked around in Fedora as much as BSD since i use my fedora laptop purley for music and internet surfing.

The default fedora Gui which is all fancy and uniqe i didnt like tho, instead i installed XFCE gui which is a lot more windows-like (i even made the start button identical to win98 start button lol) XFCE is also very flexible when it comes to customisation of the gui.

Also unlike Ubuntu, free BSD and some other linux distro i tried a while back, Fedora works right out of the box and gave me no problems.

one of the reasons u tend to dislike unix based OSs is because most of them are pretty much DIY os which requires you to know the os well to use it and someone rather new to unix OSs like myself will hate it. All linx distros and BSD i tried had some confusing mounting system so even getting a flash drive to work properly you have to spend time figuring how to mount the flash drives and make them be able to read NTFS or exFAT file systems so you can transfer files between a windows PC and a linux one. As for BSD you have to build up pretty much every feature from scratch and keep in mind the hardware your mashine runs on. (configuring Xorg and KDE/Gnome or whatever is a pain due to type of videocard you might have, altho im my brief experience BSD likes Radeons more than nVidias, and god forbid if you are trying to compile this stuff on a sandybridge/ivybridge AMD a4/6/8 machines that have an extra GPU inside the processors along with their dedicated GPU configuring those is a real pain since it will get confused over which GPU it should use)

Fedora is the first unix OS in my experience that is perfectly compatible with everything and works right out of the box. automatically mounts all types of flash drives, can read NTFS i didint have to configure anything.

so just putting it out there that fedora is the friendliest unix OS (at least in my opinion)

oh and even tho mac OS is unix based, i dont relly count them, the architecture is too closed and i never got along with mac OS, (and never found anything i could use it for).


dont hate people who rip you off,cheat and get away with it, learn from them

Login to post a reply

Server time is: 2025-05-18 02:22:28
Your offset time is: 2025-05-18 02:22:28