Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

add group without logout

# Horribly hacky, but you could use two layers of newgrp to achieve this for a particular group:

id -g

# ...will give you the current primary group ID. We'll call this orig_group for the purposes of this example. Then:

newgrp <new group name>

# ...will switch you to that group as the primary and add it to the list of groups returned by groups or id -G. Now, a further:

newgrp <orig_group>

# ...will get you a shell in which you can see the new group and the primary is the original one.
# This is horrible and will only get you one group added at a time, but it has helped me out a couple of times to get groups added without logging out/in my whole X session (e.g. to get fuse added as a group to a user so that sshfs will work).
# Edit : This doesn't require you to type your password either, which su will.
Comment

PREVIOUS NEXT
Code Example
Shell :: Unknown lifecycle phase ".surefire.debug". 
Shell :: how to upgrade a kubeone cluster 
Shell :: nuget password private source 
Shell :: ghost in the shell stand alone complex book quotes 
Shell :: #include <gst/gst.h compilation terminated. jetson nano 
Shell :: why i cant choose to install window 10 pro when installing 
Shell :: grep belirli bir dosyada arama yapmak 
Shell :: shell remove consecutive newline 
Shell :: upgrade ndoe 
Shell :: cp terminal progress bar 
Shell :: ubuntu sysmon 
Shell :: haproxy user ulimit 
Shell :: how to monitor my applications net http traffic locally in terminal 
Shell :: unix edit timestamp file: Copy the Time-stamp from Another File 
Shell :: two sed command together 
Shell :: nginx ssl configuration ubuntu with pfx file 
Shell :: install msno in jupyter notebook 
Shell :: can you upgrade processort without reinstalling proxmox 
Shell :: awk last match 
Shell :: cinelerra install terminal 
Shell :: xrandr non cambia la luminosità 
Shell :: libmodplug linux install 
Shell :: download latest stable solc ubuntu 
Shell :: how to clear mouse marks in kubuntu 
Shell :: butler push 
Shell :: how to check docker-compose logs 
Shell :: linux hide mouse pointer for touch 
Shell :: git create fodler 
Shell :: extrapolate part of video linux 
Shell :: set image deployment 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =