Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Why, fedora WHY!!!???
New Posts  All Forums:Forum Nav:

Why, fedora WHY!!!??? - Page 5

post #41 of 66
Quote:
Originally Posted by mushroomboy View Post
A misnomer would be saying SwitchUser Do for SUDO, but obviously SUDO can't switch users.
But calling su superuser only works without an argument.


Saying "su nathris" is "switchuser nathris". "superuser nathris" doesn't make any sense.
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
post #42 of 66
Quote:
Originally Posted by nathris View Post
But calling su superuser only works without an argument.


Saying "su nathris" is "switchuser nathris". "superuser nathris" doesn't make any sense.
Yes, but if a command can be done without a switch it's named for that function. All the commands that are ran without a switch are named for the function they provide without a switch.

[edit]
Code:
mrshroom@173-18-215-75:~$ groups root
root : root
mrshroom@173-18-215-75:~$
Also, root is NOT a user. Root owns, maintains, administrates the system. In fact much of the system runs under root, when you log on as root you log on as the system. This is why you can't SwitchUser Root, it makes no sense. Root is simply not a user, it's an account in the system created so that we can maintain the system as the system. Since systems can't maintain themselves very well, due to some lack of consciousness, we created an account to let us interact with the system on a personal level.

[edit2] In all honesty to say SuperUser is a misnomer in itself, as there is no SuperUser account. Root is the system, but you still can't SwitchUser Root it's just as grammatically bad.

[edit3] I need to restate that, as people will go "Root is a user". Root has an account as a user, but root isn't a user. Root is the entire system, full wide access. Root was only created as a User for a couple reasons. The biggest reason was so that WE could interact with the system. The system doesn't need root to be a User, it's just the easiest way for us to change something in the system instead of shutting down the system and editing things then. Mainly it's a safe way for us to interact with the system. Everything uses Root, the kernel uses Root! You don't say the kernel runs in User space, it runs in kernel space as it's own entity. Just because we log on as Root doesn't mean it is a user, you are logging on as the system itself.

This is why I say talking about Root as a user is incorrect; SwitchUser Root isn't quite the right way to say it but neither is SuperUser. I don't talk about logging in as root by saying "I'm logging in as user Root", no you log in as root. You don't gain "User Root" access, you gain Root access. We have this problem of thinking that Root is a user, it is the system. SU doesn't switch to User root, it is the system. To say you are logging in as the system is way to long, you are logging in as root. There are reasons why not to say that though, I'll really cover that if you want, but the best way is to say we coined Super User to conventionalize what Root was. Explaining Root as the system takes too long so we coined Super User. That makes a much easier CLI command, SU.

Blah, that's why I will always say SuperUser.
Edited by mushroomboy - 3/9/11 at 8:40pm
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #43 of 66
You're arguing semantics. It depends on the context. To say root isn't a user is a fallacy.

Even the Arch installer tells you to log in as "root".

You could also put a file at the root of a directory. But according to you that root isn't really a root either. There is only one true root and we must praise Him, for He is all-knowing and all-powerful.

Code:
//su.c
main(int argc, char *argv[])
{
static char*cleanenv;
struct passwd*pwd;
struct pam_convconv = {misc_conv, NULL};
enum tristateiscsh;
union {
const char**a;
char* const *b;
} np;
uid_truid;
gid_tgid;
intasme, ch, asthem, fastlogin, prio, i, setwhat, retcode,
statusp, child_pid, child_pgrp, ret_pid;
char*username, *class, shellbuf[MAXPATHLEN];
const char*p, *user, *shell, *mytty, **nargv;
const char*avshell;
charavshellbuf[MAXPATHLEN];

shell = class = cleanenv = NULL;
asme = asthem = fastlogin = statusp = 0;
user = "root";
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
post #44 of 66
When you log in as Root the system doesn't know you are a user. For all intents and purposes it believes you are the system. That's because every system process runs under root. It's not something you praise, it's just how the system runs. You run commands at the system level, not the user level which is completely different. The difference between Root and Users is that Users run in User space, outside of the system yet able to interact with the system. I'm not going to say you shouldn't talk about Root as a user, that makes it really difficult. Most people won't get the idea that The system runs as Root and that when you log on as Root you log on as the system. For simplicities sake it's much easier to say Root is a User, even though what the Root account actually does sets it apart from Users.

[edit] Did you not get what I said before? The system uses the account root to run itself. They didn't code accounts to be non-users, that would be yet another waste of code. It's easier to code all accounts as users, to save code and other possible problems. The system "logs in" as root, but do you say that the system is a user of itself? No. When I talk about the system, I talk about the kernel and outlining features that extend the kernel so that it can run as a system. You don't say that those processes run as a User, they can't, they run under the same "user" and account as Root. The problem is people can't understand how that can be, how can the system can use a user account to run everything? It makes a mess of explaining what Root is, what Users are, and their roles in the system. To make it easier they don't ever explain that the entire OS runs as the root account, they also say that Root is a User. This helps people identify and relate, it makes it easier to create concepts to interact and maintain the system.

I didn't really read what you had in code till later, LOL.
Edited by mushroomboy - 3/10/11 at 7:47am
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #45 of 66
Thread Starter 
you can login as root... its in the passwd file... its a user and much more of a normal user than a lot of the system accounts that run specific stuff... root is just a special user, so special it needs a helmet

even the "SYSTEM" account on windows is technically a user, and its funny to exploit that some times
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #46 of 66
Quote:
Originally Posted by EntTheGod View Post
you can login as root... its in the passwd file... its a user and much more of a normal user than a lot of the system accounts that run specific stuff... root is just a special user, so special it needs a helmet

even the "SYSTEM" account on windows is technically a user, and its funny to exploit that some times
Well yes and no. The reason why they use users to run things is so they can do group scheduling (ect). You can group processes and arrange memory by UserID and stuff, making the system manageable. It also gives an even plane so that they don't have to write new protocols for the system and users to interact. Users can interact uniformly, at the same level of each other. This is only a front, when you code you don't think of the system accounts as users. They are simply accounts that group different system protocols.

Take the CUPS user/group, we don't consider that an actual user. It doesn't have full privileges, doesn't even come close to being a crippled user. This is done so that we can easily manage permissions without the use of ACLs. However, when you code for the kernel you think of those accounts as part of the system. They are just using a tool (user accounts) to do different things and not just to create and manage Users.

Windows hides those accounts too, and it calls them System. They re-named the account so that people know that it's the system running and to separate that from the idea of the OS running as a User. They directly separate it so that people don't get confused, you don't see System running a process and have the ability to log in as System. Linux could lock out Root or create it under a different name (System) and still give you an "admin" account. They decided not to do this, there could potential problems with managing the system. They wanted direct control and the best way to do this is allow people to log in as the system account.
Edited by mushroomboy - 3/10/11 at 7:57am
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #47 of 66
Thread Starter 
they are still user accounts and if i REALLY wanted to, i could log in and run my system as any of the users in my passwd file

linux was built to be a multi user OS, and because it was built this way, it makes it easier to split tasks up among users, but they are still actual user accounts capable of being used

the reason root runs most the stuff in your OS is because its a user account that OWNS everything and can access anything, its part of the security in linux to do things this way, you would not want your normal user account to have out right permissions to start up every single little back end process on your system

root is still a user though, it is by no means the system itself... if you look at the process list, the stuff run by root is no different than the stuff run by your normal user, or any other hidden user account that runs stuff...

the only real difference usually is that you use one account, while the rest sit idle aside from the stuff they are scripted to do...

its not hard to do something like... "sudo passwd avahi" "su avahi" "whoami" and it will tell you that you are the avahi USER account and you can do anything ya want within that accounts permissions just like any other user account

PS: its not letting me edit my posts so im just tryin not to leave much out >_> sorry if it seems im rambling
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #48 of 66
Quote:
Originally Posted by transhour View Post
take a deep breath count to 10, as i'm about to reveal another shocker, it doesn't come with sudo either...
it has sudo
but it is not setup by default
you have to add you user to the sudo group
Edited by 3dfxvoodoo - 3/10/11 at 8:10am
OoGhiJ MIQtxxXA
(13 items)
 
  
CPUMotherboardGraphicsRAM
q9550 E0 @3.825ghz Abit IX48-GT3 Tigerforce SPARKLE GTX470 850c/1800m 220 650c sli later 4GB DDR3 Mushkin blackline 7-8-7-24-1T 1200mhz 
Hard DriveOptical DriveOSMonitor
WD1tb +WD500gb +WD200gb not like I need one edge linux LG 22" w2240 +optiquest q71 
KeyboardPowerCaseMouse
Adesso MKB-135B Mechanical DELTA GPS-750B A 750w sleeved moded Kandalf LCS Razer Mamba 
Mouse Pad
don't got one or need one 
  hide details  
Reply
OoGhiJ MIQtxxXA
(13 items)
 
  
CPUMotherboardGraphicsRAM
q9550 E0 @3.825ghz Abit IX48-GT3 Tigerforce SPARKLE GTX470 850c/1800m 220 650c sli later 4GB DDR3 Mushkin blackline 7-8-7-24-1T 1200mhz 
Hard DriveOptical DriveOSMonitor
WD1tb +WD500gb +WD200gb not like I need one edge linux LG 22" w2240 +optiquest q71 
KeyboardPowerCaseMouse
Adesso MKB-135B Mechanical DELTA GPS-750B A 750w sleeved moded Kandalf LCS Razer Mamba 
Mouse Pad
don't got one or need one 
  hide details  
Reply
post #49 of 66
Thread Starter 
just knew id find something else to post after my last post... stupid broken edit button...

Quote:
Originally Posted by mushroomboy View Post
They directly separate it so that people don't get confused, you don't see System running a process and have the ability to log in as System.
you see the user SYSTEM running processes in task manager in windows

and you CAN log in to the system account just not via the login program that windows provides you... the system account is a very easy target for hacking if you understand it and can trick it into letting you gain control of something it runs did you know that the first blue screen you see booting a windows xp system is actually the desktop background of SYSTEM? lol if you hack into the SYSTEM account and start up explorer.exe it will default the background to the windows hills because its the first explorer.exe start up for that user, and every time after that when you start the computer it will show the windows hills instead of a blank blue screen lol
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #50 of 66
Quote:
Originally Posted by mushroomboy View Post
When you log in as Root the system doesn't know you are a user. For all intents and purposes it believes you are the system. That's because every system process runs under root. It's not something you praise, it's just how the system runs. You run commands at the system level, not the user level which is completely different. The difference between Root and Users is that Users run in User space, outside of the system yet able to interact with the system. I'm not going to say you shouldn't talk about Root as a user, that makes it really difficult. Most people won't get the idea that The system runs as Root and that when you log on as Root you log on as the system. For simplicities sake it's much easier to say Root is a User, even though what the Root account actually does sets it apart from Users.

[edit] Did you not get what I said before? The system uses the account root to run itself. They didn't code accounts to be non-users, that would be yet another waste of code. It's easier to code all accounts as users, to save code and other possible problems. The system "logs in" as root, but do you say that the system is a user of itself? No. When I talk about the system, I talk about the kernel and outlining features that extend the kernel so that it can run as a system. You don't say that those processes run as a User, they can't, they run under the same "user" and account as Root. The problem is people can't understand how that can be, how can the system can use a user account to run everything? It makes a mess of explaining what Root is, what Users are, and their roles in the system. To make it easier they don't ever explain that the entire OS runs as the root account, they also say that Root is a User. This helps people identify and relate, it makes it easier to create concepts to interact and maintain the system.

I didn't really read what you had in code till later, LOL.
Hi,
In my opinion/experience, To Say a Program runs in system space and not in user space, when you are root would be a little wrong. System space by definition is the kernel space. for example the usbdev.ko file which is the driver is a system/kernel space file (kernel module) on the other hand libusb is a user space API which calls the ko. U can call libusb APIs in user space in a program and run it as root. The calls it would make are still user space, ergo a program is user space.

Whether or not,
root is treated as a user. which is why when you log in as root at runlevel 5 or above. You get a Desktop folder created in /root just like in /home/<username>

similarly if you copy something to ~/ as root it get copied to /root.

root is not the system. it is a user. what makes it look like "root is the system"?

All processes need an owner in unix. which has to be either a low privilege or a high privilege entity. Processes that need to run automated in the system need to be started with some user as its owner hence they are started off by root.

There are several processes that start up automatically when a user logs in too e.g the mail client/cron job thing usually. That is a process that is launched by the "System" as user $Whatever.

Just My two cents.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Why, fedora WHY!!!???