WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Creating a new $HOME environment --shadow-utils  (Read 5840 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Creating a new $HOME environment --shadow-utils
« on: March 22, 2009, 05:49:22 PM »
With shadow-utils, it's very easy to create a safe working environment where you can't mess with tc files.
(present example uses the bash and shadow-utils extensions)

# In root create group, where <groupid> is your group name:
     groupadd <groupid>.
# create user, where <userid> is your user name (you can use the same name as the group):
     useradd -s /bin/bash -g <groupid>  -d /path/home <userid>

# -s  shell (I recommend using bash)
# -d setup a path to a home directory...it will create one if not already present.

sudo su - <userid>   

# To add permissions, chown directories you want to use.

sudo chown <userid>:<groupid> /path


# To save beween boots, add to /opt/.filetool.lst:

etc/passwd
etc/group

# Also add your new home directory, if it's on the ramdisk. 
# Tools for removing or modifying are in /usr/local/sbin

#          examples:
     
      userdel -r <userid>
      usermod -d /newHome  <userid>



 
« Last Edit: April 06, 2009, 03:57:20 AM by jpeters »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Creating a new $HOME environment --shadow-utils
« Reply #1 on: May 29, 2009, 05:27:13 AM »
If I understand this correctly, when Tiny Core starts you are logged in as TC, and you use sudo su - <userid> to log in with your user name after Tiny Core is running. Is this correct?

Is there a simple way to set up Tiny Core so you log in using your user name each time Tiny Core starts?
Many people see what is. Some people see what can be, and make a difference.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Creating a new $HOME environment --shadow-utils
« Reply #2 on: May 29, 2009, 06:04:46 AM »
The bootcode user=username creates a new user named that, but he has the same rights as user tc.
The only barriers that can stop you are the ones you create yourself.