Any reason why you cant switch to any other user when logged in via shell?


inh

Recommended Posts

It's pretty annoying logging in via root, unraring a bunch of files, then having to run newperms on the directory becuase they are all root-owned. For now, I just run this to allow me to switch to user nobody and unrar and move files:

 

 usermod -d /mnt/user/awaitingunrar/ -s /bin/bash -p someotherpassword nobody

 

There is a good chance I missed something obvious, but maybe not. Is there a better way?

Link to comment
  • 2 months later...

You can give another user shell access using the command below:

 

usermod -s /bin/bash "insert username here"

 

Minus the quotes

 

Give that a try and see how you get on

 

it worked just as you described. now will this command need to be ran after every reboot?

do I need to add to my go script?

 

-=Jason=-

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.