View previous topic :: View next topic |
Author |
Message |
hippe2k n00b
Joined: 20 Jul 2011 Posts: 12
|
Posted: Wed Jul 20, 2011 10:03 pm Post subject: adding users |
|
|
hi all,
first off i am a linux newbie only know a few comands now learning day by day.
i made 4 users
useradd -M -s /bin/bash user1
useradd -M -s /bin/bash user2
useradd -M -s /bin/bash user3
useradd -M -s /bin/bash user4
i gave them a password
passwd user1 ....
now when i login to them i get there directory home/user1
only problem is now that i can't do annything,
chmod doesn't work etc.
what am i missing,
ty for helping,
h2k
edit: Code: | also tried adding user to group root.
stil no premission
useradd -G root,users test2
id test2
uid=1002(test2) gid=1002(test2) groups=1002(test2),0(root),100(users)
chmod +x hldsupdatetool.bin
chmod: changing permissions of `hldsupdatetool.bin': Operation not permitted |
|
|
Back to top |
|
|
aidanjt Veteran
Joined: 20 Feb 2005 Posts: 1118 Location: Rep. of Ireland
|
Posted: Wed Jul 20, 2011 10:28 pm Post subject: |
|
|
You should have let useradd create the directory. useradd -M tells useradd to *not* create the /home/$user directory. useradd -m explicitly tells useradd to create /home/$user when creating the user. But you can still fix up the directories after creation. Just do `mkdir /home/user && chown user /home/user && chmod 700 /home/user` as root, and that should do it. _________________
juniper wrote: | you experience political reality dilation when travelling at american political speeds. it's in einstein's formulas. it's not their fault. |
|
|
Back to top |
|
|
hippe2k n00b
Joined: 20 Jul 2011 Posts: 12
|
Posted: Thu Jul 21, 2011 6:51 am Post subject: |
|
|
AidanJT wrote: | You should have let useradd create the directory. useradd -M tells useradd to *not* create the /home/$user directory. useradd -m explicitly tells useradd to create /home/$user when creating the user. But you can still fix up the directories after creation. Just do `mkdir /home/user && chown user /home/user && chmod 700 /home/user` as root, and that should do it. |
Server doesn't reconice chown command.
and even when i delete everything an do it like:
useradd -m -G root,users -s -s /bin/bash quality
i get no rights to chmod etc. |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Thu Jul 21, 2011 7:40 am Post subject: |
|
|
sounds like an selinux or other secured system. You will have to check/set the policies for the security system you chose. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
hippe2k n00b
Joined: 20 Jul 2011 Posts: 12
|
Posted: Thu Jul 21, 2011 7:43 am Post subject: |
|
|
dol-sen wrote: | sounds like an selinux or other secured system. You will have to check/set the policies for the security system you chose. |
oke, linux dummie here.
only thing i know,
clean install of gentoo, no extra's where installed.
only thing i installed till now is gzip.
how can i see if i got something like selinux?
h2k |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Thu Jul 21, 2011 5:51 pm Post subject: |
|
|
Quote: | Server doesn't reconice chown command. | indicated to me that it may be a secured install.
check your profile and possibly re-set it (logged in as 'root')
Code: | eselect profile list
eselect profile set ... |
Also you are running the chown command as the root user aren't you? _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
Sven Vermeulen Retired Dev
Joined: 29 Aug 2002 Posts: 1345 Location: Mechelen, Belgium
|
Posted: Fri Jul 22, 2011 11:50 am Post subject: |
|
|
Is your home partition perhaps mounted with the noexec option?
Code: |
~# mount | grep /home
/dev/mapper/volgrp-home on /home type ext4 (rw,noatime,nosuid,nodev,noexec,data=journal)
|
If so, ediit /etc/fstab and remove that stuff. Then remount the partition. _________________ Please add "[solved]" to the initial topic title when it is solved. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Fri Jul 22, 2011 12:18 pm Post subject: |
|
|
Quote: | chmod +x hldsupdatetool.bin
chmod: changing permissions of `hldsupdatetool.bin': Operation not permitted |
This is the only error message provided so far, it may mean file is owned by somebody else, thus current user cannot chmod it.
Try
to see owner and permissions. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
proletarios n00b
Joined: 10 Nov 2011 Posts: 21 Location: athens
|
Posted: Thu Nov 10, 2011 10:09 am Post subject: user over ssh |
|
|
i have o problem too i want to create a user over ssh and a pure ftp user over ssh and i create a user :
useradd -u 999 -g ftpuser -d /dev/null -s /usr/bin/false
i write in /etc/shells the /usr/bin/false and i write tha pass and after login of user i saw
cannot execute /usr/bin/false permition dinied |
|
Back to top |
|
|
golagoda Tux's lil' helper
Joined: 18 Jun 2011 Posts: 105 Location: Australia
|
Posted: Thu Nov 10, 2011 10:33 am Post subject: Re: user over ssh |
|
|
proletarios wrote: | i have o problem too i want to create a user over ssh and a pure ftp user over ssh and i create a user :
useradd -u 999 -g ftpuser -d /dev/null -s /usr/bin/false
i write in /etc/shells the /usr/bin/false and i write tha pass and after login of user i saw
cannot execute /usr/bin/false permition dinied |
Does it work if you simply make it '/bin/false' instead? It is not located in /usr/bin by default. You could also use /sbin/nologin |
|
Back to top |
|
|
proletarios n00b
Joined: 10 Nov 2011 Posts: 21 Location: athens
|
Posted: Thu Nov 10, 2011 2:21 pm Post subject: Re: user over ssh |
|
|
golagoda wrote: | proletarios wrote: | i have o problem too i want to create a user over ssh and a pure ftp user over ssh and i create a user :
useradd -u 999 -g ftpuser -d /dev/null -s /usr/bin/false
i write in /etc/shells the /usr/bin/false and i write tha pass and after login of user i saw
cannot execute /usr/bin/false permition dinied |
Does it work if you simply make it '/bin/false' instead? It is not located in /usr/bin by default. You could also use /sbin/nologin |
it don't work from shell i cant login and i believe its good but i count't login and ftp |
|
Back to top |
|
|
|