Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
adding users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
hippe2k
n00b
n00b


Joined: 20 Jul 2011
Posts: 12

PostPosted: Wed Jul 20, 2011 10:03 pm    Post subject: adding users Reply with quote

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
View user's profile Send private message
aidanjt
Veteran
Veteran


Joined: 20 Feb 2005
Posts: 1118
Location: Rep. of Ireland

PostPosted: Wed Jul 20, 2011 10:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
hippe2k
n00b
n00b


Joined: 20 Jul 2011
Posts: 12

PostPosted: Thu Jul 21, 2011 6:51 am    Post subject: Reply with quote

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
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Thu Jul 21, 2011 7:40 am    Post subject: Reply with quote

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
View user's profile Send private message
hippe2k
n00b
n00b


Joined: 20 Jul 2011
Posts: 12

PostPosted: Thu Jul 21, 2011 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Thu Jul 21, 2011 5:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sven Vermeulen
Retired Dev
Retired Dev


Joined: 29 Aug 2002
Posts: 1345
Location: Mechelen, Belgium

PostPosted: Fri Jul 22, 2011 11:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Jul 22, 2011 12:18 pm    Post subject: Reply with quote

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

Code:
ls -l

to see owner and permissions.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
proletarios
n00b
n00b


Joined: 10 Nov 2011
Posts: 21
Location: athens

PostPosted: Thu Nov 10, 2011 10:09 am    Post subject: user over ssh Reply with quote

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
View user's profile Send private message
golagoda
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jun 2011
Posts: 105
Location: Australia

PostPosted: Thu Nov 10, 2011 10:33 am    Post subject: Re: user over ssh Reply with quote

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
View user's profile Send private message
proletarios
n00b
n00b


Joined: 10 Nov 2011
Posts: 21
Location: athens

PostPosted: Thu Nov 10, 2011 2:21 pm    Post subject: Re: user over ssh Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum