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 ...


3

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 ...


3

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


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, ...


1

The reason for EPERM (the permission denied error ) is here: drwxr-xr-x 5 www-data www-data 4096 juil. 30 13:47 . The directory where you are trying to create a file (in other words change contents of the directory-file) is writeable only for user www-data, which you are not. Either mark the directory as writeable for the group, change the user to ...


1

Some older Unixes allowed to "give away" file ownership, but that has been abandoned long ago. In the days of true multiuser-boxes where hundreds of users connected through terminals to a unix machine, people learned to abuse this to get around their disk quotas. Moreover, giving away files is in some sense a form of social engineering, by which unwary ...


1

Using groupadd to add groups to the system requires root privileges. Maybe you just need newgrp [newgroup]. This makes [newgroup] your primary group and adds the group to your group list (see cmd groups). Of course, first your system administrator has to put you in [newgroup], but you don't have to logout and in.


1

SMBNetFS uses Gnome-keyring by default. Any passwords entered and saved in Gnome-keyring while browsing Samba shares in Nautilus should be used automatically. So if storing passwords in Gnome-keyring is OK, SMBNetFS is more convenient. It automatically mounts the entire network neighbourhood. This information is from the sample SMBNetFS config file, but I ...



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