I just wrap it in a su -c ' '
Skinning a cat, I guess.
I just wrap it in a su -c ' '
Skinning a cat, I guess.
Thatās what I love about linux and other unix-like OSes, thereās always more than one way to do it. Itās mostly muscle memory after youāve been using it for a while.
Edit: And I like using sudo because it can keep a log. Just a personal preference.
i keep seeing people use sudo su -
which is technically wrong as -
means your piping a command to be run from stdin
echo "whoami" | sudo su -
will return root
there is the history
command though. Works for root; though you have to be logged into the root account to see it.
So whether you log into root to do you stuff, or have an elevated account which uses sudo makes no difference.
I actually prefer having a root account, and then muck around in userspace so I donāt break anything.
But sudo can be used for much more than just getting root privileges. Once you start using it to do things with the rights of multiple users or groups, and youāre one of many people who do that on a system, checking history files becomes unmanageable.
Plus, history files donāt have timestamps. If you want to know exactly what happened at a certain time, checking them is quite useless.
No, su - is equivalent to su -l :
-, -l, --login
Start the shell as a login shell with an environment similar to a real login:
o clears all the environment variables except TERM
o initializes the environment variables HOME, SHELL, USER, LOGNAME, and PATH
o changes to the target user's home directory
o sets argv[0] of the shell to '-' in order to make the shell a login shell
Thanks for the clarifaction. Dont know where i got the -
part from then. Always see -
being passed to indicate piping from stdin
Well, it would make more sense if it did, because as you say, basically every other command uses it to accept input from stdin. Just one of those inconsistencies that makes administering a linux/unix system unneccessarily complicated.
or when commands cant decide between -r
and -R
for recursive so you end up guessing have the time.
it kinda does but its my fault for not check further. echo "whoami" | sudo su -
will return ārootā regardless of whether or not -
is used
Or when you work on multiple different UNIX-like OSes and the GNU and BSD versions of certain commands use completely different commandline switches to do the same thing. Or when itās an embedded system and ifconfig suddenly doesnāt have a -a switch.
Fun!
Ahh yeah that makes sense. Iāve never been part of a multi user unix system though. Only thing I ever use it for are updating and installing new software.
I need some help with a samba share.
I have an ubuntu server that connects with our ADDC to auth users to the share. That part works perfectly. The problem is when a user creates a file on the share only they have access to modify, delete, etc. I have the domain users group added to the valid users line and write list line but they only ever get read and execute.
I would like the permissions to be more windows like in that everyone in the domain users group has access to delete/modify files unless otherwise specified. I could go through in windows to make this change but it wont take effect on new files created. I assume linux permissions dont inherit from the parent folder like windows does.
I tried to RTFM but im not sure what line, if any, I can add to my config to make this happen.
EDIT: I think perhaps ācreate maskā might do what Iām looking for?
EDIT2: I added create mask = 0766 to the share but it still results in only read execute.
EDIT3: I got create mask to work properly as well as figuring out how to make permissions inheritable. My problem is the file which I was sharing needed permissions at least as high as the ones I was trying to give via smb. I am actually an idiot and never looked at the file perms in linux before trying to make samba give them.
Weird thing that I donāt have an answer for other thanā¦ its apple.
I have a cinema display as my main monitor with a dell screen as secondary. When I rotate the dell screen in xrandr or monitor settings the main screen glitches out. If I do landscape everything is fine.
And maybe its driver problems that I need to patch myself and submit, IDK yet.
ps aux vs ps -aux
That was the bane of my existence for a while switching between Solaris, Red Hat, and MacOS X.
Thanks for providing the solution to your issue. Also, that permissions issue is a mistake that you will hopefully only make once.
It seems so obvious now but man do I feel dumb for spending as much time as I did on trying to figure it out.
How does one check the version of kernel modules in a given kernel?
Eg. Iām interested in the latest k10temp module which I compiled from github, but Iād like to know when itās included in an updated kernel version used in a distro.
modinfo
doesnāt have version. Thereās a field called āvermagicā but that contains the kernel version.
May be a dumb question, but I am having problems with installing Fedora on a new (to me) motherboard and mSATA SSD.
When I set UEFI Boot to Enabled and then select the UEFI USB in the boot device menu, I get:
exit_boot() failed!
efi_main() failed!
The ISO I used to create this boot USB is a bit suspect to me, as when I installed Fedora on this board just a bit ago using the old fashioned LEgacy BIOS boot mode it never gave me the option to set up users when installing. On reboot it logged in immediately and I couldāt do anything.
When I was booted to the Live CD (again, under Legacy BIOS) Fedora thought there were two monitors. This board has at least one (possibly two) LVDS headers in addition to an HDMI and DisplayPort. For some reason Fedora is seeing the LVDS as a monitor (even though nothing is attached) and sets that to the default monitor. I can right click and set the HDMI monitor as default, but then it moves the screen settings window to the non-existent display. I could hit Activities in the upper left and start the install process, but then I came across the weird no users setup issue.
I donāt know. If anyone has any ideas on the initial UEFI problem, thatād be great. Iāll download a fresh copy of Fedora overnight, in case thatās the problem. It takes me an hour or more to download 1.7GB, and I didnāt feel like tying up my bandwidth all evening.
EDIT: I was able to disable the LVDS in the UEFI, so the annoying two monitor issue is no longer an issue.
you could just verify the iso integrity before you waste the bandwidth downloading
Checked the hash and it matches. Test and boot works fine too.
Just canāt boot in UEFI mode.
And I just tried doing another install after booting in legacy mode and I still donāt get the option to create users while itās installing stuff.