Tag Info

Hot answers tagged

8

The sudoers file allows specifying commands to permit: username ALL=(root) NOPASSWD: /bin/foo bar baz Here username is the user you want to permit, and the command goes at the end of the line. If you specify arguments to the command, the user can only run it with exactly those arguments, but if you don't specify them here, the user can run the command ...


8

This is possible for syslinux: syslinux ~/floppy.ima The syslinux installer contains enough magic to be run on an unmounted filesystem. (In fact, it is designed to do that.) The extlinux installer expects to be run on a mounted filesystem, though. It is almost certainly possible to split off the extlinux installer into a part that copies the files ...


5

If you add a line in /etc/fstab saying something like: /dev/loop0 /mnt ext4 defaults,user 0 0 you can then mount/unmount /dev/loop0 as a regular user. And if you do chown youruser:youruser <MOUNTPOINT> <LOOPDEVICE> then extlinux , losetup, mkfs, etc can be done as youruser.


5

You have basically three options: Use a wrapper around your libraries, that will set LD_LIBRARY_PATH appropriately and then execute the desired library - something like: #!/bin/sh export LD_LIBRARY_PATH="path/goes/here" exec "$@" link with -rpath (-Wl,rpath) which adds search path for dynamic linker into the binary (see also SO answer - it also mentions ...


4

Use the TZ environment variable. E.g.: bash$ export TZ=US/Pacific bash$ date Mon Mar 3 00:31:17 PST 2014 bash$ export TZ=US/Eastern bash$ date Mon Mar 3 03:33:06 EST 2014 The possible values for TZ are in the directory /usr/share/zoneinfo (see, for example, the existence of /usr/share/zoneinfo/US/Pacific)


4

There are a few ways to output the user ID (UID) with ps; a simple one is with -f: ps -fC X Will give you information for all the X servers that are running (there can be more than one). This presumes that the executable is called X -- if there's no such process, you will have to target something else. Since it almost certainly at least has capital X in ...


4

The easiest way to do this is to install R from source: $ wget http://cran.rstudio.com/src/base/R-3/R-3.1.1.tar.gz $ tar xvf R-3.1.1.tar.gz $ cd R-3.1.1 $ ./configure --prefix=$HOME/R $ make && make install The second-to-last step is the critical one. It configures R to be installed into a subdirectory of your own home directory. To run it on ...


4

Install your favorite shell on the remote machine. You don't need any administrator privileges to do that, you can install programs in your home directory, it's just less convenient. See Installation on debian 5 32-bit without being a root, How to install program locally without sudo privileges?, Keeping track of programs and other questions. If you want to ...


4

When a user invokes sudo -l it lists what sudo will allow them to do, so you could have a script ran as root that bumps through /etc/passwd and sudo's to each user, invoke the sudo -l, directing the output to /tmp/${USER}_sudo_i_can_do.txt But if you don't have root access, you won't be able to do what you want to do; the list of permissions is readable ...


3

You can also use the wrapper application Renv. excerpt Simple R Version Management: Renv Renv lets you easily switch between multiple versions of R. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well. Renv does… Let you change the global R version on a per-user basis. Provide ...


3

This is what worked for me: USER_NAME=$(printf '%s' "${SUDO_USER:-$USER}") sudo -u $USER_NAME <command-to-exec-in-nonroot-context>


3

Make sure the home directories for the users are accessible early (before cron starts) and have them make an entry in crontab: @reboot /home/username/bin/start_at_boot This is a feature of Vixie cron which should be on your Debian system. The start_at_boot script can start the users daemons directly, or start some tool that manages and watches the users' ...


3

What may have happened is: sudo is caching your password. So, after you've correctly completed the implementation of sudo on your system, you have to enter the password for the first command, and after that it's cached for some time. If that happens and you run the sequence sudo aptitude install sendmail sudo apt-get install sendmail Then you'll have to ...


3

As variant - create a script (added to crontab) and allow to execute without password http://askubuntu.com/questions/155791/how-do-i-sudo-a-command-in-a-script-without-being-asked-for-a-password


3

First, you need some configs for ssh server and ssh client. In Server, in /etc/ssh/sshd_config, make sure you accept TZ variable: AcceptEnv LANG LC_* TZ In Client, in /etc/ssh/ssh_config or ~/.ssh/config, make sure you send TZ variable: SendEnv TZ (The defaults are usually to send none from the client, and accept none on the server.) Then make alias ...


3

If you need to do something that requires root privileges, you need to use some method of gaining root privileges, which on most modern systems means su, sudo, or a wrapper around one of these. What's dangerous about running commands as root (whether it's with su or sudo) is that it gives you a lot more ways to damage your system. So you should only run a ...


3

Simple answer: No, you cannot use on a remote box a program that is not installed on the remote box. Workaround: You do not need admin privileges to install a shell on the remote system. You can install it in your home directory but probably you have to compile it from the sources. Typically using something like configure --prefix=${HOME}/local Last note: ...


3

This is a known problem, if you ssh as root somewhere and then su to become a normal user: $ ssh root@server # su -l anthon $ screen Cannot open your terminal '/dev/pts/3' - please check. It is e.g. described in these posts from 2005 The solution is to directly login as the user you want the screen session to run as.


3

I believe you can use pmount instead. It's in the Debian 7.7 repos. $ apt-cache search pmount libpmount-dev - portable mount library - development files libpmount0.0 - portable mount library - shared library pmount - mount removable devices as normal user Usage $ pmount -h Usage: pmount [options] <device> [<label>] Mount <device> ...


2

I use JuJu which basically allows to have a really tiny linux distribution (containing just the package manager) inside your $HOME/.juju directory. It allows to have your custom system inside the home directory accessible via proot and, therefore, you can install any packages without root privileges. It will run properly to all the major linux ...


2

Create a new file at /etc/udev/rules.d/50-nexus7-deb.rules: /etc/udev/rules.d/50-nexus7-deb.rules: # adb protocol on nexus 7 deb/razorg: SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d001", MODE="0600", OWNER="myusername" # fastboot protocol on nexus 7 deb/razorg SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", ...


2

I'd take a look at Linuxbrew. A fork of Homebrew for Linux Features Can install software to a home directory and so does not require sudo Install software not packaged by the native distribution Install up-to-date versions of software when the native distribution is old Use the same package manager to manage both your Mac and Linux ...


2

I'm not convinced that it's an issue having monit run as root so long as access to it is limited correctly. Looking at the config file, /etc/monit/monitrc I noticed this section to the file: ## Monit has an embedded web server which can be used to view status of ## services monitored and manage services from a web interface. See the ## Monit Wiki if you ...


2

If you are on systemd, it's trivial, because systemd doesn't require the "fork/exec/pidfile" formalism. You just create a service file and systemd takes care of starting the process, restarting a crashed instance and so on. You can also easily allow users to create their own service files (or even run them not as root but as their own user - if that's useful ...


2

There is no easy way to do this, if any... You can try going with following way, I've done it once and I said: "Never more". Basically you need to download source of package with wget or with apt-get or whatever... Go to the downloaded package directory with cd my_package Issue: ./configure --prefix=$HOME or if you don't want the directory to be in root of ...


2

There was some corruption in my file system. I just booted system by inserting rescue disk and then checked file system with e2fsck, and restarted the system. This solved my issue.


2

Since you're using cpio, you're actually making an initramfs, not an initrd. An initrd would be stored as a filesystem image, not as a cpio archive. Initrd and initramfs have similar roles in the Linux boot process, to provide some files that are available before the true root filesystem (and that are used to mount the true root filesystem); they are handled ...


2

Those errors are there because your user has not the permission to create nodes. Only root can create nodes other than fifos and sockets (see mknod documentation under EPERM) When you repack again the initrd, those special file wouldn't be in there. To repack the initrd there is an option called --owner that can be used to set the owner for all files. BUT, ...


2

User can use sshfs to mount his remote $HOME on his local machine. In such scenario, user wouldn't use his shell of choice on the remote machine directly but, still, better than nothing.


2

The basic approach is to copy the shell executable to the remote host using scp then execute it using ssh, e.g. scp /usr/bin/fish remote:fish && ssh -t remote '~/fish' The -t is needed so that ssh allocates a tty, which it wouldn't do by default when executing a remote command. This assumes your remote host is running the same operating system. ...



Only top voted, non community-wiki answers of a minimum length are eligible