I'm having these problems with these commands and I have not idea why
Code:
# passwd
If 'passwd' is not a typo you can run the following command to lookup the package that contains the binary:
command-not-found passwd
-bash: passwd: command not found
# useradd temp
Warning: cannot create backup file `/etc/passwd.old': Operation not permitted
Error while renaming `/etc/passwd.tmpJ2hXeM': Operation not permitted
any idea what is causing this problem to add user and to change my password?
It sounds like you're not running these as root. That means the commands won't be in PATH and when you force them to run, useradd won't have the permissions to do anything. passwd should work for limited users if you run it with the full path.
# id
uid=0(root) gid=0(root) groups=0(root),104(sfcb)
Trex:~ # mount
/dev/mapper/SYS-lv_root on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
devtmpfs on /dev type devtmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda1 on /boot type ext3 (rw,acl,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
Trex:~ # stat /etc/passwd
File: `/etc/passwd'
Size: 1532 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 674102 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2011-10-02 23:39:08.000000000 -0500
Modify: 2011-05-25 09:40:33.000000000 -0500
Change: 2011-08-08 20:20:08.000000000 -0500
--------- just adding more info
Code:
whereis passwd
passwd: /etc/passwd /etc/passwd.YaST2save /usr/share/man/man5/passwd.5.gz /usr/share/man/man1/passwd.1ssl.gz /usr/share/man/man1/passwd.1.gz
Trex:~ # whereis useradd
useradd: /usr/sbin/useradd /usr/sbin/useradd.local /usr/share/man/man8/useradd.8.gz
Trex:~ # which passwd
which: no passwd in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin)
Trex:~ # which useradd
/usr/sbin/useradd
Last edited by karlochacon; 10-03-2011 at 06:16 PM..
Somehow, you don't seem to have a useradd command, at least none whereis can find You've got manpages for it but not the utility itself. Try 'man useradd' and see if it describes where it's supposed to be.
its weird that you dont have passwd and have useradd , almost unix/linux systems has passwd inside /bin,
so it may be two things , somehow passwd binary deleted, if you didn't do that , it may you have rootkit finder installed on the system ?
for useradd problem, check your disk , your system may force system file in readonly mode , or you ran out free disk space.
just try to touch a file inside /etc
Code:
touch /etc/sometestfile
and if you had permission denied or such thing check
---------- Post updated at 05:28 PM ---------- Previous update was at 05:25 PM ----------
Quote:
Originally Posted by ieth0
its weird that you dont have passwd and have useradd , almost unix/linux systems has passwd inside /bin,
so it may be two things , somehow passwd binary deleted, if you didn't do that , it may you have rootkit finder installed on the system ?
for useradd problem, check your disk , your system may force system file in readonly mode , or you ran out free disk space.
just try to touch a file inside /etc
Code:
touch /etc/sometestfile
and if you had permission denied or such thing check
Dear All,
I have Perl Script which previously running on solaris and now our system is moved to HP UX.
The script is creating the users on unix and database.
1. When we are creating the new user, useradd keep newly created account in locked state
2. In script we were using Passwd... (5 Replies)
Hi
root user creates a user using the useradd command. This command creates an entry in the /etc/passwd file. /etc/passwd file has rw permission for the root user. Now, if I happen to remove the w permission for the root user, useradd command still is successfully creating entry in the... (3 Replies)
I want to creat a 27 logins in solaris.Can anyone tell me how to write a script for that so that i create at a time for all 27 people.
Thanks to guide me. (6 Replies)
Hi Folks,
I have Solaris 10, latest release.
We have passwd aging set in /etc/defalut/passwd.
I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging.
When I reset the users passwd using passwd command, it re enables... (3 Replies)
Gurus,
I need to add a user to all the machines. I need a script to do this. I did one but it does not allow me to su to root within a ssh session i open. It exists saying su: Sorry. Please let me know how i can do it. I do not have the freedom of using sudo either.
Regards (4 Replies)
Hi,
I need to add a new user who will only be able to access one single folder on my Solaris 9 system. Can this be achieved by using just useradd or do i need to fiddle with auth_attr table?
TIA,
Selma (4 Replies)
Hi.
due to some needs i gave a user the premission to use useradd command with sudo.
i want to know if there is a way to let him set the initial password, without giving him the premission to use passwd command as root (sudo).
maybe a way to set a default password for all the new users that... (2 Replies)
I work on some hp ux 11.00 Servers. i have to add an user. i use the useradd command like follows: useradd -u 72022 -g 71095 -c " comment " -d /PACKAGE_NAME/home/username -s /usr/bin/sh username
The command returns with error 3. The manpage means value number 3: Invalid argument supplied to an... (6 Replies)