User Tools

Site Tools


linux:sudo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
linux:sudo [2016/04/05 09:51] – created jansenlinux:sudo [2016/04/05 09:54] jansen
Line 10: Line 10:
     - the software is already installed. Really, we try to do a good job to install everything needed for computations in astronomy, physics and mathematics. Including (most frequent case) all prerequisites for running [[http://www.amusecode.org|AMUSE]] or [[http://casa.nrao.edu|CASA]]. So try running your programs before trying to install them     - the software is already installed. Really, we try to do a good job to install everything needed for computations in astronomy, physics and mathematics. Including (most frequent case) all prerequisites for running [[http://www.amusecode.org|AMUSE]] or [[http://casa.nrao.edu|CASA]]. So try running your programs before trying to install them
     - many install notes explain how to install a package system-wide, even if there are ways to install it just for yourself, which is probably what you want anyway (see below for tips and details)     - many install notes explain how to install a package system-wide, even if there are ways to install it just for yourself, which is probably what you want anyway (see below for tips and details)
-  - Mistaken identity or location (e.g. assuming you are in a terminal on your laptop, whereas you are actually logged in to our workstations). No harm doen, and here it is a very good thing that your ''sudo'' attempt is blocked.+  - Mistaken identity or location (e.g. assuming you are in a terminal on your laptop, whereas you are actually logged in to our workstations). No harm done, and here it is a very good thing that your ''sudo'' attempt is blocked.
   - Doing something that you can already do without elevated privileges:   - Doing something that you can already do without elevated privileges:
     - mounting usb disks should work when you are logged in on the console (unless, see below)     - mounting usb disks should work when you are logged in on the console (unless, see below)
     - rebooting a desktop is possible from the menu or the login screen without password. or if that fails: ''ctrl-alt-F2'' to switch to a text screen, followed by ''ctrl-alt-delete'' to reboot     - rebooting a desktop is possible from the menu or the login screen without password. or if that fails: ''ctrl-alt-F2'' to switch to a text screen, followed by ''ctrl-alt-delete'' to reboot
-    - if anything related to your own files gives a permission problem, there may be a problem (e.g. disk became read-only), or it is a file permission you can fix yourself (e.g. setting ''execute'' permission on a newly created script). Anything downloaded from the internet will not have excute permission even if it is a valid program. ''chmod +x'' is your tool here, no sudo required. Anything copied from cdrom/dvd has only read permission, because it came from read-only media. ''chmod +w'' will make sure you can edit it.+    - if anything related to your own files gives a permission problem, there may be a problem (e.g. disk became read-only), or it is a file permission you can fix yourself (e.g. setting ''execute'' permission on a newly created script). Anything downloaded from the internet will not have execute permission even if it is a valid program. ''chmod +x'' is your tool here, no sudo required. Anything copied from cdrom/dvd has only read permission, because it came from read-only media. ''chmod +w'' will make sure you can edit it.
  
 In general, if you encounter a situation where you think ''sudo'' is the answer, check this list first and if you still think something needs to be done using elevated privileges, contact the [[https://helpdesk.strw.leidenuniv.nl|helpdesk]]. In general, if you encounter a situation where you think ''sudo'' is the answer, check this list first and if you still think something needs to be done using elevated privileges, contact the [[https://helpdesk.strw.leidenuniv.nl|helpdesk]].
Line 24: Line 24:
   * ''configure'' scripts often have a ''--prefix'' option to specify the install location. Check ''INSTALL'' notes that come with the package, and ''configure --help'' often lists supported options too.   * ''configure'' scripts often have a ''--prefix'' option to specify the install location. Check ''INSTALL'' notes that come with the package, and ''configure --help'' often lists supported options too.
   * Python source packages often come with a ''setup.py''. When running the ''install'' phase, you can also specify a ''--prefix'' location, or use ''--user'' to install in a location in your home directory.   * Python source packages often come with a ''setup.py''. When running the ''install'' phase, you can also specify a ''--prefix'' location, or use ''--user'' to install in a location in your home directory.
-  * Installing python packages using ''pip'' or ''easy_install' will also work if you give it a ''--prefix'' or ''--user'' option+  * Installing python packages using ''pip'' or ''easy_install'' will also work if you give it a ''--prefix'' or ''--user'' option
   * a package that comes with a ''Makefile'' often has a ''install'' target or some other location where you can set the destination. No real standards here, you may have to read the documentation and/or the makefile.   * a package that comes with a ''Makefile'' often has a ''install'' target or some other location where you can set the destination. No real standards here, you may have to read the documentation and/or the makefile.
  
linux/sudo.txt · Last modified: 2017/06/28 09:37 by jansen