Unable to create new user account

Hi,

I’m new to linux, I am trying to create a new user account on opensuse 12.1 in command line… I got the following error

command : useradd -g users -d /export/home/user1 -m user1

useradd: Warning: chown on /export/home/user1' failed: Invalid argument Cannot change owner/group for /export/home/user1’: Invalid argument
Cannot change permissions for /export/home/user1/.config': Invalid argument Cannot change permissions for /export/home/user1/.bashrc’: Invalid argument
Cannot change permissions for /export/home/user1/public_html/.directory': Invalid argument Cannot change permissions for /export/home/user1/public_html’: Invalid argument
Cannot change permissions for /export/home/user1/.fonts': Invalid argument Cannot change permissions for /export/home/user1/.profile’: Invalid argument
Cannot change permissions for /export/home/user1/.xim.template': Invalid argument Cannot change permissions for /export/home/user1/.bash_history’: Invalid argument
Cannot change permissions for /export/home/user1/.inputrc': Invalid argument Cannot change permissions for /export/home/user1/bin’: Invalid argument
Cannot change permissions for /export/home/user1/.local': Invalid argument Cannot change permissions for /export/home/user1/.xinitrc.template’: Invalid argument
Cannot change permissions for /export/home/user1/.emacs': Invalid argument Cannot change permissions for /export/home/user1/.vimrc’: Invalid argument
useradd: Copying of skel directory failed.

any idea how do I resolve this?

Thanks…

Try
useradd -G users

On 2012-01-19 23:46, patilrajashekar wrote:
>
> Hi,
>
> I’m new to linux, I am trying to create a new user account on opensuse
> 12.1 in command line… I got the following error
>
> command : useradd -g users -d /export/home/user1 -m user1

Two things.

That command is supposed to be used as root. How did you made yourself
root, exactly? We like to see here full commands copied from the display,
and you substituted part of it with the word “command”.

We also want people to post that using “code tags”.

Second. As you are new, why didn’t you use YaST?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

The machine is remotely located to use YaST.

The system doesn’t allow direct root login, so I login my account then su to root

useradd -g users -d /export/home/user1 -m user1

You were asked what you did. Paste here the commands that you ran.
Also read the man page for adduser if you do not understand
*useradd -G users … *

On 2012-01-20 00:46, patilrajashekar wrote:
>
> The machine is remotely located to use YaST.

YaST runs fine inside a remote ssh shell, in text mode, or in remote
graphical mode.

>
> The system doesn’t allow direct root login, so I login my account then
> su to root

Don’t use “su”, use “su -”.

>
>
> Code:
> --------------------
> useradd -g users -d /export/home/user1 -m user1
> --------------------

That’s not what I asked for. I wanted the exact text, and missing are the
su command and the prompts to the left of the screen. We are talking
computers here, attention to details and precision is primordial.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I hope this is what you were asking for!!

power@lsi66:~> su -
Password: 
lsi66:~ # useradd -G users -d /export/home/user2 -m user2
useradd: Warning: chown on `/export/home/user2' failed: Invalid argument
Cannot change owner/group for `/export/home/user2': Invalid argument
Cannot change permissions for `/export/home/user2/.config': Invalid argument
Cannot change permissions for `/export/home/user2/.bashrc': Invalid argument
Cannot change permissions for `/export/home/user2/public_html/.directory': Invalid argument
Cannot change permissions for `/export/home/user2/public_html': Invalid argument
Cannot change permissions for `/export/home/user2/.fonts': Invalid argument
Cannot change permissions for `/export/home/user2/.profile': Invalid argument
Cannot change permissions for `/export/home/user2/.xim.template': Invalid argument
Cannot change permissions for `/export/home/user2/.bash_history': Invalid argument
Cannot change permissions for `/export/home/user2/.inputrc': Invalid argument
Cannot change permissions for `/export/home/user2/bin': Invalid argument
Cannot change permissions for `/export/home/user2/.local': Invalid argument
Cannot change permissions for `/export/home/user2/.xinitrc.template': Invalid argument
Cannot change permissions for `/export/home/user2/.emacs': Invalid argument
Cannot change permissions for `/export/home/user2/.vimrc': Invalid argument
useradd: Copying of skel directory failed.
lsi66:~ # 

On 2012-01-20 01:36, patilrajashekar wrote:
>
> I hope this is what you were asking for!!

Perfect!

> Code:
> --------------------
> power@lsi66:~> su -
> Password:
> lsi66:~ # useradd -G users -d /export/home/user2 -m user2
> useradd: Warning: chown on `/export/home/user2’ failed: Invalid argument

Cannot change owner/group for /export/home/user2': Invalid argument > Cannot change permissions for /export/home/user2/.config’: Invalid argument

> useradd: Copying of skel directory failed.
> lsi66:~ #
> --------------------

I tried your exact sequence and succeeded, no problem. So then there
something different in your /export directory. I guess it is on an
external, perhaps network media. What kind exactly? Show the output of
mount containing that filesystem.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 01/20/2012 02:18 AM, Carlos E. R. wrote:
> So then there
> something different in your /export directory.

and, maybe there are some differences (between the OP and Carlos’
systems) so, i think it might be instructive to see the output of


cat /etc/SuSE-release

for bot local and distant machine…

and, just for grins once user logged into the distant machine via ssh,
does the ncurses yast pop up if these commands are given?


su -
yast

and, if so, and if user2 is added with yast, does it also error? (if so
can we see those errors, please)

or, maybe all of that is a waste of time.


DD http://tinyurl.com/DD-Caveat
openSUSE®, the “German Engineered Automobiles” of operating systems!

Yes, it looks very much like a non-Linux file system, doesn’t it? Let us wait for the output of

mount

I was able to create users in command line as well on YaST… but still the errors exist
> lsi66:~ # useradd -G users -d /export/home/user2 -m user2
> useradd: Warning: chown on `/export/home/user2’ failed: Invalid argument

Cannot change owner/group for /export/home/user2': Invalid argument > Cannot change permissions for /export/home/user2/.config’: Invalid argument

I tried chown

lsi66:/export/home # mkdir /export/home/powerme
lsi66:/export/home # chown powerme /export/home/powerme
chown: changing ownership of `/export/home/powerme': Invalid argument

Suse release

lsi66:~ # cat /etc/SuSE-release
openSUSE 12.1 (x86_64)
VERSION = 12.1
CODENAME = Asparagus
lsi66:~ # 

the output of mount

lsi66:~ # mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=12328732k,nr_inodes=3082183,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda2 on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=21,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
/dev/sda6 on /home type ext3 (rw,relatime,errors=continue,commit=5,barrier=1,data=ordered)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
192.168.1.105:/export/export on /export type nfs4 (rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.106,minorversion=0,local_lock=none,addr=192.168.1.105)
lsi66:~ # 

That is a NTFS volume you are trying to create the user home on NTFS does not have the proper permission bits to do a true Linux file system, thus the errors.

ie you can not create a home on a NTFS volume and expect it to work correctly.

How do I fix it??

Use only Linux file systems for Linux systems.

The abilaty to read/write non Linux file systems on Linux is only for exchanging data with non Linux systems. Not for day to day usage as part of the Linux system itself.

We have all Linux systems with opensuse 10.3 and 12.1!!
Is there a way I can fix it??

Thanks in advance…

Sorry, it is allready a long time ago I saw this thread (4 day!!!) and I lost trace of it Forget my post directly above,
@gogalthorp: it is nfs4, not NTFS.

192.168.1.105:/export/export on /export type nfs4 (rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.106,minorversion=0,local_lock=none,addr=192.168.1.105)

This shows it is an NFS file system.
Normaly, on an NFS mounted file system, root has no special allowance to do things. After all the these are files on another system and it is not certain that the cleint systems system manager is also the system manager of the server system.

Thus root can not do a lot of things there. You must beg the system manager of the other server to give the root of the client root permissions.

On 2012-01-24 19:26, gogalthorp wrote:
>
> That is a NTFS volume you are trying to create the user home on NTFS

I’m not sure of that :-? I see an NFS but not an NTFS. Although the
symptoms point to that.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-01-24 23:26, hcvv wrote:

> Thus root can not do a lot of things there. You must beg the system
> manager of the other server to give the root of the client root
> permissions.

exports(5)

Very often, it is not desirable that the root user on a client
machine is also treated as root when accessing files
on the NFS server. To this end, uid 0 is normally mapped to a
different id: the so-called anonymous or nobody uid.
This mode of operation (called `root squashing’) is the default,
and can be turned off with no_root_squash.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

these two command are using in linux to add use

  1. adduser
  2. useradd

try both command.

Arran


Chicago cleaning service
Chicago commercial cleaning